aboutsummaryrefslogtreecommitdiff
path: root/fs/nfs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-07-25 12:53:15 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-25 12:53:15 -0700
commit0003230e8200699860f0b10af524dc47bf8aecad (patch)
tree8addb0c889b32111d6973c46cd3d0a5b5c17606c /fs/nfs
parent4b478cedcdc1b2d131170f22bd3f916e53472f52 (diff)
parent4e34e719e457f2e031297175410fc0bd4016a085 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: fs: take the ACL checks to common code bury posix_acl_..._masq() variants kill boilerplates around posix_acl_create_masq() generic_acl: no need to clone acl just to push it to set_cached_acl() kill boilerplate around posix_acl_chmod_masq() reiserfs: cache negative ACLs for v1 stat format xfs: cache negative ACLs if there is no attribute fork 9p: do no return 0 from ->check_acl without actually checking vfs: move ACL cache lookup into generic code CIFS: Fix oops while mounting with prefixpath xfs: Fix wrong return value of xfs_file_aio_write fix devtmpfs race caam: don't pass bogus S_IFCHR to debugfs_create_...() get rid of create_proc_entry() abuses - proc_mkdir() is there for purpose asus-wmi: ->is_visible() can't return negative fix jffs2 ACLs on big-endian with 16bit mode_t 9p: close ACL leaks ocfs2_init_acl(): fix a leak VFS : mount lock scalability for internal mounts
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/nfs3acl.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/nfs/nfs3acl.c b/fs/nfs/nfs3acl.c
index 27434277165..e49e73107e6 100644
--- a/fs/nfs/nfs3acl.c
+++ b/fs/nfs/nfs3acl.c
@@ -427,16 +427,12 @@ int nfs3_proc_set_default_acl(struct inode *dir, struct inode *inode,
}
if (!dfacl)
return 0;
- acl = posix_acl_clone(dfacl, GFP_KERNEL);
- error = -ENOMEM;
- if (!acl)
- goto out_release_dfacl;
- error = posix_acl_create_masq(acl, &mode);
+ acl = posix_acl_dup(dfacl);
+ error = posix_acl_create(&acl, GFP_KERNEL, &mode);
if (error < 0)
- goto out_release_acl;
+ goto out_release_dfacl;
error = nfs3_proc_setacls(inode, acl, S_ISDIR(inode->i_mode) ?
dfacl : NULL);
-out_release_acl:
posix_acl_release(acl);
out_release_dfacl:
posix_acl_release(dfacl);