diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2014-08-24 14:46:48 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-09-05 16:34:18 -0700 |
commit | 862fd32cef8b6d2c1365245f38d631fb838ea90b (patch) | |
tree | 0015de1ca4d264b5969e4d4532dafbd127430379 /fs | |
parent | 96a93162e29169cb7cd5b0343953b6e41b260b1f (diff) | |
download | linux-stable-862fd32cef8b6d2c1365245f38d631fb838ea90b.tar.gz linux-stable-862fd32cef8b6d2c1365245f38d631fb838ea90b.tar.bz2 linux-stable-862fd32cef8b6d2c1365245f38d631fb838ea90b.zip |
NFSv3: Fix another acl regression
commit f87d928f6d98644d39809a013a22f981d39017cf upstream.
When creating a new object on the NFS server, we should not be sending
posix setacl requests unless the preceding posix_acl_create returned a
non-trivial acl. Doing so, causes Solaris servers in particular to
return an EINVAL.
Fixes: 013cdf1088d72 (nfs: use generic posix ACL infrastructure,,,)
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1132786
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/nfs3acl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfs/nfs3acl.c b/fs/nfs/nfs3acl.c index d0fec260132a..24c6898159cc 100644 --- a/fs/nfs/nfs3acl.c +++ b/fs/nfs/nfs3acl.c @@ -129,7 +129,10 @@ static int __nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl, .rpc_argp = &args, .rpc_resp = &fattr, }; - int status; + int status = 0; + + if (acl == NULL && (!S_ISDIR(inode->i_mode) || dfacl == NULL)) + goto out; status = -EOPNOTSUPP; if (!nfs_server_capable(inode, NFS_CAP_ACLS)) |