[RFC][PATCH 09/27] elevate mnt writers for sys_mkdirat() call of vfs_mkdir()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Signed-off-by: Dave Hansen <haveblue@xxxxxxxxxx>
---

 fs/nfsd/nfs4recover.c |    0 
 lxc-dave/fs/namei.c   |    5 +++++
 2 files changed, 5 insertions(+)

diff -puN fs/namei.c~sys_mkdir_at-do-mnt_want_write fs/namei.c
--- lxc/fs/namei.c~sys_mkdir_at-do-mnt_want_write	2006-06-07 16:53:17.000000000 -0700
+++ lxc-dave/fs/namei.c	2006-06-07 16:53:17.000000000 -0700
@@ -1906,7 +1906,12 @@ asmlinkage long sys_mkdirat(int dfd, con
 
 	if (!IS_POSIXACL(nd.dentry->d_inode))
 		mode &= ~current->fs->umask;
+	error = mnt_want_write(nd.mnt);
+	if (error)
+		goto out_dput;
 	error = vfs_mkdir(nd.dentry->d_inode, dentry, mode);
+	mnt_drop_write(nd.mnt);
+out_dput:
 	dput(dentry);
 out_unlock:
 	mutex_unlock(&nd.dentry->d_inode->i_mutex);
diff -puN fs/nfsd/nfs4recover.c~sys_mkdir_at-do-mnt_want_write fs/nfsd/nfs4recover.c
_
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux