]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[PATCH] r/o bind mounts: check mnt instead of superblock directly
authorDave Hansen <haveblue@us.ibm.com>
Fri, 15 Feb 2008 22:37:56 +0000 (14:37 -0800)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 19 Apr 2008 04:29:27 +0000 (00:29 -0400)
commit2c463e95480829a2fe8f386589516e13b1289db6
tree7294d93a15f62ccc2c649ef9782b7f85ae7d1ef8
parentec82687f29127a954dd0da95dc1e0a4ce92b560c
[PATCH] r/o bind mounts: check mnt instead of superblock directly

If we depend on the inodes for writeability, we will not catch the r/o mounts
when implemented.

This patches uses __mnt_want_write().  It does not guarantee that the mount
will stay writeable after the check.  But, this is OK for one of the checks
because it is just for a printk().

The other two are probably unnecessary and duplicate existing checks in the
VFS.  This won't make them better checks than before, but it will make them
detect r/o mounts.

Acked-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/nfs/dir.c
fs/nfsd/vfs.c