Linux-EROFS Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v2 1/2] staging: erofs: use xattr_prefix to wrap up
@ 2019-01-25 16:10 gaoxiang25
  2019-01-25 16:10 ` [PATCH v2 2/2] staging: erofs: complete POSIX ACL support gaoxiang25
  2019-01-26  2:08 ` [PATCH v2 1/2] staging: erofs: use xattr_prefix to wrap up yuchao0
  0 siblings, 2 replies; 16+ messages in thread
From: gaoxiang25 @ 2019-01-25 16:10 UTC (permalink / raw)


Let's use xattr_prefix instead of open code.
No logic changes.

Signed-off-by: Gao Xiang <gaoxiang25 at 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

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, back to index

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-25 16:10 [PATCH v2 1/2] staging: erofs: use xattr_prefix to wrap up gaoxiang25
2019-01-25 16:10 ` [PATCH v2 2/2] staging: erofs: complete POSIX ACL support gaoxiang25
2019-01-26  2:48   ` yuchao0
2019-01-26  3:06     ` hsiangkao
2019-01-28 13:33     ` dan.carpenter
2019-01-28 13:48       ` gaoxiang25
2019-01-28 14:28         ` dan.carpenter
2019-01-28 15:04           ` hsiangkao
2019-01-28 16:41         ` chao
2019-01-28 18:30           ` dan.carpenter
2019-01-29  8:03             ` gaoxiang25
2019-02-03  2:52             ` yuchao0
2019-02-15  2:10               ` yuchao0
2019-02-15  7:36                 ` dan.carpenter
2019-02-15  9:31                   ` yuchao0
2019-01-26  2:08 ` [PATCH v2 1/2] staging: erofs: use xattr_prefix to wrap up yuchao0

Linux-EROFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-erofs/0 linux-erofs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-erofs linux-erofs/ https://lore.kernel.org/linux-erofs \
		linux-erofs@lists.ozlabs.org linux-erofs@ozlabs.org
	public-inbox-index linux-erofs

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.ozlabs.lists.linux-erofs


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git