[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git-commits-head
Subject:    [PATCH] freevxfs: Add missing lock_kernel() to vxfs_readdir
From:       Linux Kernel Mailing List <linux-kernel () vger ! kernel ! org>
Date:       2006-07-31 21:00:51
Message-ID: 200607312100.k6VL0pkT014252 () hera ! kernel ! org
[Download RAW message or body]

commit bc65ac6a0ffc66c56d1e6893685d7fe87c63cc44
tree 8c8bde036220b27361e864249c4961fdc2591eca
parent 0a5eca6530eb4d0120981936058537c24a2f92ce
author Josh Triplett <josht@us.ibm.com> Sun, 30 Jul 2006 17:04:12 -0700
committer Linus Torvalds <torvalds@g5.osdl.org> Tue, 01 Aug 2006 03:28:44 -0700

[PATCH] freevxfs: Add missing lock_kernel() to vxfs_readdir

Commit 7b2fd697427e73c81d5fa659efd91bd07d303b0e in the historical GIT tree
stopped calling the readdir member of a file_operations struct with the big
kernel lock held, and fixed up all the readdir functions to do their own
locking.  However, that change added calls to unlock_kernel() in
vxfs_readdir, but no call to lock_kernel().  Fix this by adding a call to
lock_kernel().

Signed-off-by: Josh Triplett <josh@freedesktop.org>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

 fs/freevxfs/vxfs_lookup.c |    2 ++
 1 files changed, 2 insertions(+)

diff --git a/fs/freevxfs/vxfs_lookup.c b/fs/freevxfs/vxfs_lookup.c
index 29cce45..43886fa 100644
--- a/fs/freevxfs/vxfs_lookup.c
+++ b/fs/freevxfs/vxfs_lookup.c
@@ -246,6 +246,8 @@ vxfs_readdir(struct file *fp, void *retp
 	u_long			page, npages, block, pblocks, nblocks, offset;
 	loff_t			pos;
 
+	lock_kernel();
+
 	switch ((long)fp->f_pos) {
 	case 0:
 		if (filler(retp, ".", 1, fp->f_pos, ip->i_ino, DT_DIR) < 0)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic