diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 5b404d926e082fb7727b1cd8400b05f8d742f6a7..faea98281c75adc81c805be585d808a50e27dea3 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -2407,7 +2407,7 @@ pnfs_report_layoutstat(struct inode *inode, gfp_t gfp_flags) spin_lock(&inode->i_lock); if (!NFS_I(inode)->layout) { spin_unlock(&inode->i_lock); - goto out; + goto out_clear_layoutstats; } hdr = NFS_I(inode)->layout; pnfs_get_layout_hdr(hdr); @@ -2436,6 +2436,7 @@ pnfs_report_layoutstat(struct inode *inode, gfp_t gfp_flags) kfree(data); out_put: pnfs_put_layout_hdr(hdr); +out_clear_layoutstats: smp_mb__before_atomic(); clear_bit(NFS_INO_LAYOUTSTATS, &nfsi->flags); smp_mb__after_atomic();