nilfs2: do not emit extra newline on nilfs_warning() and nilfs_error()
[sfrench/cifs-2.6.git] / fs / nilfs2 / segment.c
index 4317f72568e60651709149497c8c027e608cf773..a6ef1eb15edb0b42226e093f1d9a05e2c6010724 100644 (file)
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- *
- * Written by Ryusuke Konishi <ryusuke@osrg.net>
+ * Written by Ryusuke Konishi.
  *
  */
 
@@ -617,7 +613,7 @@ static void nilfs_write_file_node_binfo(struct nilfs_sc_info *sci,
        *vblocknr = binfo->bi_v.bi_vblocknr;
 }
 
-static struct nilfs_sc_operations nilfs_sc_file_ops = {
+static const struct nilfs_sc_operations nilfs_sc_file_ops = {
        .collect_data = nilfs_collect_file_data,
        .collect_node = nilfs_collect_file_node,
        .collect_bmap = nilfs_collect_file_bmap,
@@ -666,7 +662,7 @@ static void nilfs_write_dat_node_binfo(struct nilfs_sc_info *sci,
        *binfo_dat = binfo->bi_dat;
 }
 
-static struct nilfs_sc_operations nilfs_sc_dat_ops = {
+static const struct nilfs_sc_operations nilfs_sc_dat_ops = {
        .collect_data = nilfs_collect_dat_data,
        .collect_node = nilfs_collect_file_node,
        .collect_bmap = nilfs_collect_dat_bmap,
@@ -674,7 +670,7 @@ static struct nilfs_sc_operations nilfs_sc_dat_ops = {
        .write_node_binfo = nilfs_write_dat_node_binfo,
 };
 
-static struct nilfs_sc_operations nilfs_sc_dsync_ops = {
+static const struct nilfs_sc_operations nilfs_sc_dsync_ops = {
        .collect_data = nilfs_collect_file_data,
        .collect_node = NULL,
        .collect_bmap = NULL,
@@ -1043,7 +1039,7 @@ static size_t nilfs_segctor_buffer_rest(struct nilfs_sc_info *sci)
 
 static int nilfs_segctor_scan_file(struct nilfs_sc_info *sci,
                                   struct inode *inode,
-                                  struct nilfs_sc_operations *sc_ops)
+                                  const struct nilfs_sc_operations *sc_ops)
 {
        LIST_HEAD(data_buffers);
        LIST_HEAD(node_buffers);
@@ -1550,7 +1546,7 @@ nilfs_segctor_update_payload_blocknr(struct nilfs_sc_info *sci,
        sector_t blocknr;
        unsigned long nfinfo = segbuf->sb_sum.nfinfo;
        unsigned long nblocks = 0, ndatablk = 0;
-       struct nilfs_sc_operations *sc_op = NULL;
+       const struct nilfs_sc_operations *sc_op = NULL;
        struct nilfs_segsum_pointer ssp;
        struct nilfs_finfo *finfo = NULL;
        union nilfs_binfo binfo;
@@ -1942,7 +1938,7 @@ static int nilfs_segctor_collect_dirty_files(struct nilfs_sc_info *sci,
                                ifile, ii->vfs_inode.i_ino, &ibh);
                        if (unlikely(err)) {
                                nilfs_warning(sci->sc_super, __func__,
-                                             "failed to get inode block.\n");
+                                             "failed to get inode block.");
                                return err;
                        }
                        mark_buffer_dirty(ibh);
@@ -2395,6 +2391,7 @@ static int nilfs_segctor_construct(struct nilfs_sc_info *sci, int mode)
 static void nilfs_construction_timeout(unsigned long data)
 {
        struct task_struct *p = (struct task_struct *)data;
+
        wake_up_process(p);
 }
 
@@ -2727,13 +2724,13 @@ static void nilfs_segctor_destroy(struct nilfs_sc_info *sci)
 
        if (!list_empty(&sci->sc_dirty_files)) {
                nilfs_warning(sci->sc_super, __func__,
-                             "dirty file(s) after the final construction\n");
+                             "dirty file(s) after the final construction");
                nilfs_dispose_list(nilfs, &sci->sc_dirty_files, 1);
        }
 
        if (!list_empty(&sci->sc_iput_queue)) {
                nilfs_warning(sci->sc_super, __func__,
-                             "iput queue is not empty\n");
+                             "iput queue is not empty");
                nilfs_dispose_list(nilfs, &sci->sc_iput_queue, 1);
        }
 
@@ -2810,7 +2807,7 @@ void nilfs_detach_log_writer(struct super_block *sb)
        if (!list_empty(&nilfs->ns_dirty_files)) {
                list_splice_init(&nilfs->ns_dirty_files, &garbage_list);
                nilfs_warning(sb, __func__,
-                             "Hit dirty file after stopped log writer\n");
+                             "Hit dirty file after stopped log writer");
        }
        spin_unlock(&nilfs->ns_inode_lock);
        up_write(&nilfs->ns_segctor_sem);