summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-dir-read.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/afr/src/afr-dir-read.c')
-rw-r--r--xlators/cluster/afr/src/afr-dir-read.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-dir-read.c b/xlators/cluster/afr/src/afr-dir-read.c
index 28bf89f2842..984ed9c6095 100644
--- a/xlators/cluster/afr/src/afr-dir-read.c
+++ b/xlators/cluster/afr/src/afr-dir-read.c
@@ -149,6 +149,10 @@ afr_validate_read_subvol (inode_t *inode, xlator_t *this, int par_read_subvol)
* either afr_data_subvol_get() or afr_metadata_subvol_get() would
* yield the same result. Hence, choosing afr_data_subvol_get() below.
*/
+
+ if (!priv->consistent_metadata)
+ return 0;
+
entry_read_subvol = afr_data_subvol_get (inode, this, 0, 0);
if (entry_read_subvol != par_read_subvol)
return -1;