Skip to contentSkip to conversation

fix ->mknod() return value on xfs_get_acl() failure

PATCH In review Al Viro 2 participants 2 messages Jun 5, 2011 – Jun 6, 2011 XFS filesystem

lore
Share & tools
lore

Al Viro

author
#0 lore raw

PATCH 1/1 fix ->mknod() return value on xfs_get_acl() failure

	->mknod() should return negative on errors and PTR_ERR() gives

already negative value...

---

fs/xfs/linux-2.6/xfs_iops.c +1 -1
index dd21784..d44d92c 100644
@@ -182,7 +182,7 @@ xfs_vn_mknod(
 	if (IS_POSIXACL(dir)) {
 		default_acl = xfs_get_acl(dir, ACL_TYPE_DEFAULT);
 		if (IS_ERR(default_acl))
-			return -PTR_ERR(default_acl);
+			return PTR_ERR(default_acl);
 
 		if (!default_acl)
 			mode &= ~current_umask();
#1 lore raw
Quoted 2 lines · Al Viro
	->mknod() should return negative on errors and PTR_ERR() gives

already negative value...

Indeed. Thanks for the patch.