summaryrefslogtreecommitdiffstats
path: root/fs/jbd/commit.c
diff options
context:
space:
mode:
authorDave Hansen <haveblue@us.ibm.com>2007-10-17 08:31:14 +0200
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-17 17:43:05 +0200
commitb41572e929221b0d87f529106cdf12185ee84bca (patch)
tree0ffd9252f53e9e964e962d6d428377851f12b015 /fs/jbd/commit.c
parentr/o bind mounts: filesystem helpers for custom 'struct file's (diff)
downloadlinux-b41572e929221b0d87f529106cdf12185ee84bca.tar.xz
linux-b41572e929221b0d87f529106cdf12185ee84bca.zip
r/o bind mounts: rearrange may_open() to be r/o friendly
may_open() calls vfs_permission() before it does checks for IS_RDONLY(inode). It checks _again_ inside of vfs_permission(). The check inside of vfs_permission() is going away eventually. With the mnt_want/drop_write() functions, all of the r/o checks (except for this one) are consistently done before calling permission(). Because of this, I'd like to use permission() to hold a debugging check to make sure that the mnt_want/drop_write() calls are actually being made. So, to do this: 1. remove the IS_RDONLY() check from permission() 2. enforce that you must mnt_want_write() before even calling permission() 3. actually add the debugging check to permission() We need to rearrange may_open() to do r/o checks before calling permission(). Here's the patch. Signed-off-by: Dave Hansen <haveblue@us.ibm.com> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/jbd/commit.c')
0 files changed, 0 insertions, 0 deletions