[PATCH] Btrfs: cleanup error handling in btrfs_set_acl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When kmalloc fails, it returns directly by ENOMEM instead
of 'goto out'.

Signed-off-by: Tsutomu Itoh <t-itoh@xxxxxxxxxxxxxx>
---
 fs/btrfs/acl.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c
index 89b156d..3757995 100644
--- a/fs/btrfs/acl.c
+++ b/fs/btrfs/acl.c
@@ -136,10 +136,8 @@ static int btrfs_set_acl(struct btrfs_trans_handle *trans,
 	if (acl) {
 		size = posix_acl_xattr_size(acl->a_count);
 		value = kmalloc(size, GFP_NOFS);
-		if (!value) {
-			ret = -ENOMEM;
-			goto out;
-		}
+		if (!value)
+			return -ENOMEM;
 
 		ret = posix_acl_to_xattr(acl, value, size);
 		if (ret < 0)

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux