From: Gao Xiang <gaoxiang25@huawei.com>
To: Chao Yu <yuchao0@huawei.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
<devel@driverdev.osuosl.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
<linux-erofs@lists.ozlabs.org>, "Chao Yu" <chao@kernel.org>,
Miao Xie <miaoxie@huawei.com>, <weidu.du@huawei.com>,
Fang Wei <fangwei1@huawei.com>, Gao Xiang <gaoxiang25@huawei.com>
Subject: [PATCH v2 1/2] staging: erofs: use xattr_prefix to wrap up
Date: Sat, 26 Jan 2019 00:10:06 +0800 [thread overview]
Message-ID: <20190125161007.4447-1-gaoxiang25@huawei.com> (raw)
Let's use xattr_prefix instead of open code.
No logic changes.
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
---
change log v2:
- remove the confusing line according to Dan Carpenter;
drivers/staging/erofs/xattr.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/erofs/xattr.c b/drivers/staging/erofs/xattr.c
index 1c9498e38f0e..7de46690d972 100644
--- a/drivers/staging/erofs/xattr.c
+++ b/drivers/staging/erofs/xattr.c
@@ -520,8 +520,7 @@ static int xattr_entrylist(struct xattr_iter *_it,
if (h == NULL || (h->list != NULL && !h->list(it->dentry)))
return 1;
- /* Note that at least one of 'prefix' and 'name' should be non-NULL */
- prefix = h->prefix != NULL ? h->prefix : h->name;
+ prefix = xattr_prefix(h);
prefix_len = strlen(prefix);
if (it->buffer == NULL) {
--
2.14.4
next reply other threads:[~2019-01-25 16:12 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-25 16:10 Gao Xiang [this message]
2019-01-25 16:10 ` [PATCH v2 2/2] staging: erofs: complete POSIX ACL support Gao Xiang
2019-01-26 2:48 ` Chao Yu
2019-01-26 3:06 ` Gao Xiang
2019-01-28 13:33 ` Dan Carpenter
2019-01-28 13:48 ` Gao Xiang
2019-01-28 14:28 ` Dan Carpenter
2019-01-28 15:04 ` Gao Xiang
2019-01-28 16:41 ` Chao Yu
2019-01-28 18:30 ` Dan Carpenter
2019-01-29 8:03 ` Gao Xiang
2019-02-03 2:52 ` Chao Yu
2019-02-15 2:10 ` Chao Yu
2019-02-15 7:36 ` Dan Carpenter
2019-02-15 9:31 ` Chao Yu
2019-01-26 2:08 ` [PATCH v2 1/2] staging: erofs: use xattr_prefix to wrap up Chao Yu
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=20190125161007.4447-1-gaoxiang25@huawei.com \
--to=gaoxiang25@huawei.com \
--cc=chao@kernel.org \
--cc=devel@driverdev.osuosl.org \
--cc=fangwei1@huawei.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miaoxie@huawei.com \
--cc=weidu.du@huawei.com \
--cc=yuchao0@huawei.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).