From: Hongchao Zhang Date: Tue, 16 Aug 2016 20:19:07 +0000 (-0400) Subject: staging: lustre: llite: set dir LOV xattr length variable X-Git-Tag: v4.9-rc1~119^2~1083 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=50ccd16ea29af542fc61aed0f0311cb287234a83;p=karo-tx-linux.git staging: lustre: llite: set dir LOV xattr length variable the LOV xattr of directory could be either lov_user_md_v1 (size is 32) or lov_user_md_v3 (size is 48), then the actual size of the LOV xattr should be return. Signed-off-by: Hongchao Zhang Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5100 Reviewed-on: http://review.whamcloud.com/10453 Reviewed-by: James Simmons Reviewed-by: Alex Zhuravlev Reviewed-by: jacques-Charles Lafoucriere Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/llite/xattr.c b/drivers/staging/lustre/lustre/llite/xattr.c index aa0738be8b90..146da6b1e97c 100644 --- a/drivers/staging/lustre/lustre/llite/xattr.c +++ b/drivers/staging/lustre/lustre/llite/xattr.c @@ -379,14 +379,6 @@ static int ll_xattr_get(const struct xattr_handler *handler, if (!S_ISREG(inode->i_mode) && !S_ISDIR(inode->i_mode)) return -ENODATA; - if (size == 0 && S_ISDIR(inode->i_mode)) { - /* XXX directory EA is fix for now, optimize to save - * RPC transfer - */ - rc = sizeof(struct lov_user_md); - goto out; - } - lsm = ccc_inode_lsm_get(inode); if (!lsm) { if (S_ISDIR(inode->i_mode)) {