From a127e2d518269ad95364639c293c8a5c1a1cdd3c Mon Sep 17 00:00:00 2001 From: Kautuk Consul Date: Fri, 23 Sep 2011 22:08:29 +0530 Subject: namespace: mnt_want_write: Remove unused label 'out' I was studying the code and I saw that the out label is not being used at all so I removed it and its usage from the function. Signed-off-by: Kautuk Consul Signed-off-by: Jiri Kosina --- fs/namespace.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'fs') diff --git a/fs/namespace.c b/fs/namespace.c index b4febb2..9a1ddcd 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -352,9 +352,7 @@ int mnt_want_write(struct vfsmount *mnt) if (__mnt_is_readonly(mnt)) { mnt_dec_writers(mnt); ret = -EROFS; - goto out; } -out: preempt_enable(); return ret; } -- cgit v1.1 From 67c50a7ed52a3ba4537d3dad5eb34c1abb5f3e05 Mon Sep 17 00:00:00 2001 From: Thomas Meyer Date: Sun, 20 Nov 2011 13:35:57 +0100 Subject: qnx4fs: Use kmemdup rather than duplicating its implementation The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer Signed-off-by: Anders Larsen Signed-off-by: Jiri Kosina --- fs/qnx4/inode.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'fs') diff --git a/fs/qnx4/inode.c b/fs/qnx4/inode.c index 3bdd214..f9e9568 100644 --- a/fs/qnx4/inode.c +++ b/fs/qnx4/inode.c @@ -199,12 +199,13 @@ static const char *qnx4_checkroot(struct super_block *sb) if (!strcmp(rootdir->di_fname, QNX4_BMNAME)) { found = 1; - qnx4_sb(sb)->BitMap = kmalloc( sizeof( struct qnx4_inode_entry ), GFP_KERNEL ); + qnx4_sb(sb)->BitMap = kmemdup(rootdir, + sizeof(struct qnx4_inode_entry), + GFP_KERNEL); if (!qnx4_sb(sb)->BitMap) { brelse (bh); return "not enough memory for bitmap inode"; - } - memcpy( qnx4_sb(sb)->BitMap, rootdir, sizeof( struct qnx4_inode_entry ) ); /* keep bitmap inode known */ + }/* keep bitmap inode known */ break; } } -- cgit v1.1 From 42b2aa86c6670347a2a07e6d7af0e0ecc8fdbff9 Mon Sep 17 00:00:00 2001 From: "Justin P. Mattock" Date: Mon, 28 Nov 2011 20:31:00 -0800 Subject: treewide: Fix typos in various parts of the kernel, and fix some comments. The below patch fixes some typos in various parts of the kernel, as well as fixes some comments. Please let me know if I missed anything, and I will try to get it changed and resent. Signed-off-by: Justin P. Mattock Acked-by: Randy Dunlap Signed-off-by: Jiri Kosina --- fs/btrfs/inode.c | 2 +- fs/ext3/inode.c | 2 +- fs/ext4/inode.c | 2 +- fs/nfsd/nfs4state.c | 2 +- fs/ocfs2/file.c | 2 +- fs/xfs/xfs_file.c | 6 +++--- fs/xfs/xfs_log_cil.c | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) (limited to 'fs') diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 116ab67..c3308c3 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -1943,7 +1943,7 @@ enum btrfs_orphan_cleanup_state { }; /* - * This is called in transaction commmit time. If there are no orphan + * This is called in transaction commit time. If there are no orphan * files in the subvolume, it removes orphan item and frees block_rsv * structure. */ diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index 85fe655..15cb470 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/inode.c @@ -2490,7 +2490,7 @@ int ext3_can_truncate(struct inode *inode) * transaction, and VFS/VM ensures that ext3_truncate() cannot run * simultaneously on behalf of the same inode. * - * As we work through the truncate and commmit bits of it to the journal there + * As we work through the truncate and commit bits of it to the journal there * is one core, guiding principle: the file's tree must always be consistent on * disk. We must be able to restart the truncate after a crash. * diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 240f6e2..b1c57bf 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -3502,7 +3502,7 @@ int ext4_punch_hole(struct file *file, loff_t offset, loff_t length) * transaction, and VFS/VM ensures that ext4_truncate() cannot run * simultaneously on behalf of the same inode. * - * As we work through the truncate and commmit bits of it to the journal there + * As we work through the truncate and commit bits of it to the journal there * is one core, guiding principle: the file's tree must always be consistent on * disk. We must be able to restart the truncate after a crash. * diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 47e94e3..9ca16dc 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -658,7 +658,7 @@ static int nfsd4_sanitize_slot_size(u32 size) /* * XXX: If we run out of reserved DRC memory we could (up to a point) * re-negotiate active sessions and reduce their slot usage to make - * rooom for new connections. For now we just fail the create session. + * room for new connections. For now we just fail the create session. */ static int nfsd4_get_drc_mem(int slotsize, u32 num) { diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index de4ea1a..199c606 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -2108,7 +2108,7 @@ static int ocfs2_prepare_inode_for_write(struct file *file, * remove_suid() calls ->setattr without any hint that * we may have already done our cluster locking. Since * ocfs2_setattr() *must* take cluster locks to - * proceeed, this will lead us to recursively lock the + * proceed, this will lead us to recursively lock the * inode. There's also the dinode i_size state which * can be lost via setattr during extending writes (we * set inode->i_size at the end of a write. */ diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index 753ed9b..f675f3d 100644 --- a/fs/xfs/xfs_file.c +++ b/fs/xfs/xfs_file.c @@ -209,10 +209,10 @@ xfs_file_fsync( /* * First check if the VFS inode is marked dirty. All the dirtying - * of non-transactional updates no goes through mark_inode_dirty*, - * which allows us to distinguish beteeen pure timestamp updates + * of non-transactional updates do not go through mark_inode_dirty*, + * which allows us to distinguish between pure timestamp updates * and i_size updates which need to be caught for fdatasync. - * After that also theck for the dirty state in the XFS inode, which + * After that also check for the dirty state in the XFS inode, which * might gets cleared when the inode gets written out via the AIL * or xfs_iflush_cluster. */ diff --git a/fs/xfs/xfs_log_cil.c b/fs/xfs/xfs_log_cil.c index c7755d5..3ba29b1 100644 --- a/fs/xfs/xfs_log_cil.c +++ b/fs/xfs/xfs_log_cil.c @@ -256,7 +256,7 @@ xfs_cil_prepare_item( * Insert the log items into the CIL and calculate the difference in space * consumed by the item. Add the space to the checkpoint ticket and calculate * if the change requires additional log metadata. If it does, take that space - * as well. Remove the amount of space we addded to the checkpoint ticket from + * as well. Remove the amount of space we added to the checkpoint ticket from * the current transaction ticket so that the accounting works out correctly. */ static void -- cgit v1.1 From 90802ed9c3dbab2e067bd9fc67a30e66e6774e8f Mon Sep 17 00:00:00 2001 From: Paul Bolle Date: Mon, 5 Dec 2011 13:00:34 +0100 Subject: treewide: Fix comment and string typo 'bufer' Signed-off-by: Paul Bolle Signed-off-by: Jiri Kosina --- fs/ext4/inode.c | 2 +- fs/jbd/checkpoint.c | 2 +- fs/jbd2/checkpoint.c | 2 +- fs/xfs/xfs_buf.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'fs') diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index b1c57bf..d87991d 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -1878,7 +1878,7 @@ static void ext4_end_io_buffer_write(struct buffer_head *bh, int uptodate); * a[0] = 'a'; * truncate(f, 4096); * we have in the page first buffer_head mapped via page_mkwrite call back - * but other bufer_heads would be unmapped but dirty(dirty done via the + * but other buffer_heads would be unmapped but dirty (dirty done via the * do_wp_page). So writepage should write the first block. If we modify * the mmap area beyond 1024 we will again get a page_fault and the * page_mkwrite callback will do the block allocation and mark the diff --git a/fs/jbd/checkpoint.c b/fs/jbd/checkpoint.c index f94fc48..5d1a00a 100644 --- a/fs/jbd/checkpoint.c +++ b/fs/jbd/checkpoint.c @@ -537,7 +537,7 @@ int cleanup_journal_tail(journal_t *journal) * them. * * Called with j_list_lock held. - * Returns number of bufers reaped (for debug) + * Returns number of buffers reaped (for debug) */ static int journal_clean_one_cp_list(struct journal_head *jh, int *released) diff --git a/fs/jbd2/checkpoint.c b/fs/jbd2/checkpoint.c index 16a698b..d49d202 100644 --- a/fs/jbd2/checkpoint.c +++ b/fs/jbd2/checkpoint.c @@ -565,7 +565,7 @@ int jbd2_cleanup_journal_tail(journal_t *journal) * * Called with the journal locked. * Called with j_list_lock held. - * Returns number of bufers reaped (for debug) + * Returns number of buffers reaped (for debug) */ static int journal_clean_one_cp_list(struct journal_head *jh, int *released) diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index cf0ac05..33e06d2 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c @@ -1370,7 +1370,7 @@ restart: goto restart; } /* - * clear the LRU reference count so the bufer doesn't get + * clear the LRU reference count so the buffer doesn't get * ignored in xfs_buf_rele(). */ atomic_set(&bp->b_lru_ref, 0); -- cgit v1.1 From d7a83c0f7f0f7a04710f31701f195018a4f5fdd3 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 31 Oct 2011 20:50:45 +0100 Subject: fat: Spelling s/obsolate/obsolete/g Signed-off-by: Geert Uytterhoeven Signed-off-by: Jiri Kosina --- fs/fat/inode.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'fs') diff --git a/fs/fat/inode.c b/fs/fat/inode.c index 808cac7..1021ec1 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c @@ -898,7 +898,7 @@ enum { Opt_charset, Opt_shortname_lower, Opt_shortname_win95, Opt_shortname_winnt, Opt_shortname_mixed, Opt_utf8_no, Opt_utf8_yes, Opt_uni_xl_no, Opt_uni_xl_yes, Opt_nonumtail_no, Opt_nonumtail_yes, - Opt_obsolate, Opt_flush, Opt_tz_utc, Opt_rodir, Opt_err_cont, + Opt_obsolete, Opt_flush, Opt_tz_utc, Opt_rodir, Opt_err_cont, Opt_err_panic, Opt_err_ro, Opt_discard, Opt_err, }; @@ -928,17 +928,17 @@ static const match_table_t fat_tokens = { {Opt_err_panic, "errors=panic"}, {Opt_err_ro, "errors=remount-ro"}, {Opt_discard, "discard"}, - {Opt_obsolate, "conv=binary"}, - {Opt_obsolate, "conv=text"}, - {Opt_obsolate, "conv=auto"}, - {Opt_obsolate, "conv=b"}, - {Opt_obsolate, "conv=t"}, - {Opt_obsolate, "conv=a"}, - {Opt_obsolate, "fat=%u"}, - {Opt_obsolate, "blocksize=%u"}, - {Opt_obsolate, "cvf_format=%20s"}, - {Opt_obsolate, "cvf_options=%100s"}, - {Opt_obsolate, "posix"}, + {Opt_obsolete, "conv=binary"}, + {Opt_obsolete, "conv=text"}, + {Opt_obsolete, "conv=auto"}, + {Opt_obsolete, "conv=b"}, + {Opt_obsolete, "conv=t"}, + {Opt_obsolete, "conv=a"}, + {Opt_obsolete, "fat=%u"}, + {Opt_obsolete, "blocksize=%u"}, + {Opt_obsolete, "cvf_format=%20s"}, + {Opt_obsolete, "cvf_options=%100s"}, + {Opt_obsolete, "posix"}, {Opt_err, NULL}, }; static const match_table_t msdos_tokens = { @@ -1170,7 +1170,7 @@ static int parse_options(struct super_block *sb, char *options, int is_vfat, break; /* obsolete mount options */ - case Opt_obsolate: + case Opt_obsolete: fat_msg(sb, KERN_INFO, "\"%s\" option is obsolete, " "not supported now", p); break; -- cgit v1.1 From cb54f2571ff3f5128f18efcf888ce3c051c589d9 Mon Sep 17 00:00:00 2001 From: "Justin P. Mattock" Date: Mon, 21 Nov 2011 08:43:28 -0800 Subject: btrfs: free-space-cache.c: remove extra semicolon. The patch below removes an extra semicolon. Signed-off-by: Justin P. Mattock CC: Chris Mason CC: linux-btrfs@vger.kernel.org Signed-off-by: Jiri Kosina --- fs/btrfs/free-space-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs') diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index 181760f..75a7b11 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c @@ -418,7 +418,7 @@ static void io_ctl_set_crc(struct io_ctl *io_ctl, int index) } if (index == 0) - offset = sizeof(u32) * io_ctl->num_pages;; + offset = sizeof(u32) * io_ctl->num_pages; crc = btrfs_csum_data(io_ctl->root, io_ctl->orig + offset, crc, PAGE_CACHE_SIZE - offset); -- cgit v1.1