]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: lustre: llite: set dir LOV xattr length variable
authorHongchao Zhang <hongchao.zhang@intel.com>
Tue, 16 Aug 2016 20:19:07 +0000 (16:19 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Aug 2016 13:57:37 +0000 (15:57 +0200)
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 <hongchao.zhang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5100
Reviewed-on: http://review.whamcloud.com/10453
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/xattr.c

index aa0738be8b902551324b266131c7cac90f8f4c15..146da6b1e97c1ee874127c883ee36a43c2e29daf 100644 (file)
@@ -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)) {