diff options
Diffstat (limited to 'fs/nfs/nfs3acl.c')
-rw-r--r-- | fs/nfs/nfs3acl.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/nfs/nfs3acl.c b/fs/nfs/nfs3acl.c index 274342771655..e49e73107e62 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, | |||
427 | } | 427 | } |
428 | if (!dfacl) | 428 | if (!dfacl) |
429 | return 0; | 429 | return 0; |
430 | acl = posix_acl_clone(dfacl, GFP_KERNEL); | 430 | acl = posix_acl_dup(dfacl); |
431 | error = -ENOMEM; | 431 | error = posix_acl_create(&acl, GFP_KERNEL, &mode); |
432 | if (!acl) | ||
433 | goto out_release_dfacl; | ||
434 | error = posix_acl_create_masq(acl, &mode); | ||
435 | if (error < 0) | 432 | if (error < 0) |
436 | goto out_release_acl; | 433 | goto out_release_dfacl; |
437 | error = nfs3_proc_setacls(inode, acl, S_ISDIR(inode->i_mode) ? | 434 | error = nfs3_proc_setacls(inode, acl, S_ISDIR(inode->i_mode) ? |
438 | dfacl : NULL); | 435 | dfacl : NULL); |
439 | out_release_acl: | ||
440 | posix_acl_release(acl); | 436 | posix_acl_release(acl); |
441 | out_release_dfacl: | 437 | out_release_dfacl: |
442 | posix_acl_release(dfacl); | 438 | posix_acl_release(dfacl); |