From: Zhang Zhen <zhenzhang.zhang@huawei.com>
To: <clm@fb.com>, <jbacik@fb.com>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: [PATCH] btrfs: remove a FIXME in btrfs_get_acl()
Date: Mon, 19 May 2014 14:26:26 +0800 [thread overview]
Message-ID: <5379A412.3050806@huawei.com> (raw)
In-Reply-To: <1400480536-18691-1-git-send-email-zhenzhang.zhang@huawei.com>
There is no function returns a value of -ENOENT, so the check is
useless.
Remove it, and the redundant braces.
Signed-off-by: Zhang Zhen <zhenzhang.zhang@huawei.com>
---
fs/btrfs/acl.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c
index ff9b399..cae7480 100644
--- a/fs/btrfs/acl.c
+++ b/fs/btrfs/acl.c
@@ -53,14 +53,12 @@ struct posix_acl *btrfs_get_acl(struct inode *inode, int type)
return ERR_PTR(-ENOMEM);
size = __btrfs_getxattr(inode, name, value, size);
}
- if (size > 0) {
+ if (size > 0)
acl = posix_acl_from_xattr(&init_user_ns, value, size);
- } else if (size == -ENOENT || size == -ENODATA || size == 0) {
- /* FIXME, who returns -ENOENT? I think nobody */
+ else if (size == -ENODATA || size == 0)
acl = NULL;
- } else {
+ else
acl = ERR_PTR(-EIO);
- }
kfree(value);
if (!IS_ERR(acl))
--
1.8.1.2
.
parent reply other threads:[~2014-05-19 6:27 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1400480536-18691-1-git-send-email-zhenzhang.zhang@huawei.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5379A412.3050806@huawei.com \
--to=zhenzhang.zhang@huawei.com \
--cc=clm@fb.com \
--cc=jbacik@fb.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.