aboutsummaryrefslogtreecommitdiffstats
path: root/ipc/mqueue.c
diff options
context:
space:
mode:
authorDave Hansen <haveblue@us.ibm.com>2008-02-15 17:37:34 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2008-04-19 00:25:33 -0400
commit0622753b800e4cc6cb9319b36b27658c72dd7cdc (patch)
tree5a32b65a087ff7fd5effa8d3f6f1f9717d4391aa /ipc/mqueue.c
parent49e0d02cf018d4edf24bfc8531a816a26367e4ce (diff)
[PATCH] r/o bind mounts: elevate write count for rmdir and unlink.
Elevate the write count during the vfs_rmdir() and vfs_unlink(). [AV: merged rmdir and unlink parts, added missing pieces in nfsd] Acked-by: Serge Hallyn <serue@us.ibm.com> Acked-by: Al Viro <viro@ZenIV.linux.org.uk> Signed-off-by: Christoph Hellwig <hch@lst.de> 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>
Diffstat (limited to 'ipc/mqueue.c')
-rw-r--r--ipc/mqueue.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index 60f7a27f7a9e..34262c11f480 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -742,8 +742,11 @@ asmlinkage long sys_mq_unlink(const char __user *u_name)
742 inode = dentry->d_inode; 742 inode = dentry->d_inode;
743 if (inode) 743 if (inode)
744 atomic_inc(&inode->i_count); 744 atomic_inc(&inode->i_count);
745 745 err = mnt_want_write(mqueue_mnt);
746 if (err)
747 goto out_err;
746 err = vfs_unlink(dentry->d_parent->d_inode, dentry); 748 err = vfs_unlink(dentry->d_parent->d_inode, dentry);
749 mnt_drop_write(mqueue_mnt);
747out_err: 750out_err:
748 dput(dentry); 751 dput(dentry);
749 752