r-o-bind-mounts-sys_mknodat-elevate-write-count-for-vfs_mknod-create
commitbfb4f9a63e28c46884e74aea8fa37af45b4ecdaf
authorDave Hansen <haveblue@us.ibm.com>
Tue, 6 Nov 2007 02:21:51 +0000 (6 02:21 +0000)
committerMatthias Urlichs <smurf@hera.kernel.org>
Wed, 14 Nov 2007 11:29:58 +0000 (14 11:29 +0000)
treec4a20c4e6e402118485e8043054dd844e41ab46d
parent1cbeac24a3c81c01f0d39b1f48e2db61618af5af
r-o-bind-mounts-sys_mknodat-elevate-write-count-for-vfs_mknod-create

This takes care of all of the direct callers of vfs_mknod().
Since a few of these cases also handle normal file creation
as well, this also covers some calls to vfs_create().

So that we don't have to make three mnt_want/drop_write()
calls inside of the switch statement, we move some of its
logic outside of the switch and into a helper function
suggested by Christoph.

This also encapsulates a fix for mknod(S_IFREG) that Miklos
found.

Acked-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/namei.c
fs/nfsd/vfs.c
net/unix/af_unix.c