xfs
[Top] [All Lists]

[PATCH] fix ->mknod() return value on xfs_get_acl() failure

To: xfs@xxxxxxxxxxx
Subject: [PATCH] fix ->mknod() return value on xfs_get_acl() failure
From: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Date: Sun, 5 Jun 2011 12:12:31 +0100
Cc: linux-kernel@xxxxxxxxxxxxxxx
Sender: Al Viro <viro@xxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
        ->mknod() should return negative on errors and PTR_ERR() gives
already negative value...

Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
---
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c
index dd21784..d44d92c 100644
--- a/fs/xfs/linux-2.6/xfs_iops.c
+++ b/fs/xfs/linux-2.6/xfs_iops.c
@@ -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();

<Prev in Thread] Current Thread [Next in Thread>