Whamcloud - gitweb
LU-10094 mdc: dir page ldp_hash_end mistakenly adjusted
[fs/lustre-release.git] / lustre / mdc / mdc_request.c
index d6d978d..04cef2a 100644 (file)
@@ -1252,12 +1252,12 @@ static void mdc_adjust_dirpages(struct page **pages, int cfs_pgs, int lu_pgs)
        int i;
 
        for (i = 0; i < cfs_pgs; i++) {
-               struct lu_dirpage       *dp = kmap(pages[i]);
-               struct lu_dirpage       *first = dp;
-               struct lu_dirent        *end_dirent = NULL;
-               struct lu_dirent        *ent;
-               __u64           hash_end = le64_to_cpu(dp->ldp_hash_end);
-               __u32           flags = le32_to_cpu(dp->ldp_flags);
+               struct lu_dirpage *dp = kmap(pages[i]);
+               struct lu_dirpage *first = dp;
+               struct lu_dirent *end_dirent = NULL;
+               struct lu_dirent *ent;
+               __u64 hash_end = dp->ldp_hash_end;
+               __u32 flags = dp->ldp_flags;
 
                while (--lu_pgs > 0) {
                        ent = lu_dirent_start(dp);
@@ -1272,8 +1272,8 @@ static void mdc_adjust_dirpages(struct page **pages, int cfs_pgs, int lu_pgs)
                                break;
 
                        /* Save the hash and flags of this lu_dirpage. */
-                       hash_end = le64_to_cpu(dp->ldp_hash_end);
-                       flags = le32_to_cpu(dp->ldp_flags);
+                       hash_end = dp->ldp_hash_end;
+                       flags = dp->ldp_flags;
 
                        /* Check if lu_dirpage contains no entries. */
                        if (end_dirent == NULL)