Whamcloud - gitweb
LU-6142 ptlrpc: Fix style issues for sec_plain.c
[fs/lustre-release.git] / lustre / llite / xattr26.c
index 28772dd..152eb7f 100644 (file)
@@ -430,8 +430,8 @@ getxattr_nocache:
 out_xattr:
        if (rc == -EOPNOTSUPP && xattr_type == XATTR_USER_T) {
                LCONSOLE_INFO("%s: disabling user_xattr feature because "
-                               "it is not supported on the server: rc = %d\n",
-                               ll_get_fsname(inode->i_sb, NULL, 0), rc);
+                             "it is not supported on the server: rc = %d\n",
+                             ll_i2sbi(inode)->ll_fsname, rc);
                sbi->ll_flags &= ~LL_SBI_USER_XATTR;
        }
 out:
@@ -451,6 +451,7 @@ static ssize_t ll_getxattr_lov(struct inode *inode, void *buf, size_t buf_size)
                        .cl_buf.lb_len = buf_size,
                };
                __u16 refcheck;
+               __u32 magic;
 
                if (obj == NULL)
                        RETURN(-ENODATA);
@@ -477,7 +478,8 @@ static ssize_t ll_getxattr_lov(struct inode *inode, void *buf, size_t buf_size)
                 * otherwise it would confuse tar --xattr by
                 * recognizing layout gen as stripe offset when the
                 * file is restored. See LU-2809. */
-               if (((struct lov_mds_md *)buf)->lmm_magic == LOV_MAGIC_COMP_V1)
+               magic = ((struct lov_mds_md *)buf)->lmm_magic;
+               if (magic == LOV_MAGIC_COMP_V1 || magic == LOV_MAGIC_FOREIGN)
                        goto out_env;
 
                ((struct lov_mds_md *)buf)->lmm_layout_gen = 0;