diff options
Diffstat (limited to 'fs/nfsd/nfs4acl.c')
-rw-r--r-- | fs/nfsd/nfs4acl.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/fs/nfsd/nfs4acl.c b/fs/nfsd/nfs4acl.c index 105544eac9a3..5d94555cdc83 100644 --- a/fs/nfsd/nfs4acl.c +++ b/fs/nfsd/nfs4acl.c | |||
@@ -357,33 +357,20 @@ nfs4_acl_nfsv4_to_posix(struct nfs4_acl *acl, struct posix_acl **pacl, | |||
357 | goto out; | 357 | goto out; |
358 | 358 | ||
359 | error = nfs4_acl_split(acl, dacl); | 359 | error = nfs4_acl_split(acl, dacl); |
360 | if (error < 0) | 360 | if (error) |
361 | goto out_acl; | 361 | goto out_acl; |
362 | 362 | ||
363 | if (acl->naces == 0) { | ||
364 | error = -ENODATA; | ||
365 | goto try_dpacl; | ||
366 | } | ||
367 | |||
368 | *pacl = _nfsv4_to_posix_one(acl, flags); | 363 | *pacl = _nfsv4_to_posix_one(acl, flags); |
369 | if (IS_ERR(*pacl)) { | 364 | if (IS_ERR(*pacl)) { |
370 | error = PTR_ERR(*pacl); | 365 | error = PTR_ERR(*pacl); |
371 | *pacl = NULL; | 366 | *pacl = NULL; |
372 | goto out_acl; | 367 | goto out_acl; |
373 | } | 368 | } |
374 | try_dpacl: | ||
375 | if (dacl->naces == 0) { | ||
376 | if (pacl == NULL || *pacl == NULL) | ||
377 | error = -ENODATA; | ||
378 | goto out_acl; | ||
379 | } | ||
380 | 369 | ||
381 | error = 0; | ||
382 | *dpacl = _nfsv4_to_posix_one(dacl, flags); | 370 | *dpacl = _nfsv4_to_posix_one(dacl, flags); |
383 | if (IS_ERR(*dpacl)) { | 371 | if (IS_ERR(*dpacl)) { |
384 | error = PTR_ERR(*dpacl); | 372 | error = PTR_ERR(*dpacl); |
385 | *dpacl = NULL; | 373 | *dpacl = NULL; |
386 | goto out_acl; | ||
387 | } | 374 | } |
388 | out_acl: | 375 | out_acl: |
389 | if (error) { | 376 | if (error) { |