Skip to contentSkip to conversation

fs/9p: Fix the return error on default acl removal

PATCH New Aneesh Kumar K.V 1 participant 1 message Dec 16, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs/9p: Fix the return error on default acl removal

If we don't have default ACL, then trying to remove default acl on a file should return 0.

---
 fs/9p/acl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/9p/acl.c +1 -1
index 12d6023..c9c3376 100644
@@ -362,7 +362,7 @@ static int v9fs_xattr_set_acl(struct dentry *dentry, const char *name,
 	case ACL_TYPE_DEFAULT:
 		name = POSIX_ACL_XATTR_DEFAULT;
 		if (!S_ISDIR(inode->i_mode)) {
-			retval = -EINVAL;
+			retval = acl ? -EINVAL : 0;
 			goto err_out;
 		}
 		break;
Signature · 1 line
1.7.1