Commit f538d0ba authored by Trond Myklebust's avatar Trond Myklebust Committed by Anna Schumaker

pNFS: Fix a leaked layoutstats flag

Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent 6e14a92c
...@@ -2407,7 +2407,7 @@ pnfs_report_layoutstat(struct inode *inode, gfp_t gfp_flags) ...@@ -2407,7 +2407,7 @@ pnfs_report_layoutstat(struct inode *inode, gfp_t gfp_flags)
spin_lock(&inode->i_lock); spin_lock(&inode->i_lock);
if (!NFS_I(inode)->layout) { if (!NFS_I(inode)->layout) {
spin_unlock(&inode->i_lock); spin_unlock(&inode->i_lock);
goto out; goto out_clear_layoutstats;
} }
hdr = NFS_I(inode)->layout; hdr = NFS_I(inode)->layout;
pnfs_get_layout_hdr(hdr); pnfs_get_layout_hdr(hdr);
...@@ -2436,6 +2436,7 @@ pnfs_report_layoutstat(struct inode *inode, gfp_t gfp_flags) ...@@ -2436,6 +2436,7 @@ pnfs_report_layoutstat(struct inode *inode, gfp_t gfp_flags)
kfree(data); kfree(data);
out_put: out_put:
pnfs_put_layout_hdr(hdr); pnfs_put_layout_hdr(hdr);
out_clear_layoutstats:
smp_mb__before_atomic(); smp_mb__before_atomic();
clear_bit(NFS_INO_LAYOUTSTATS, &nfsi->flags); clear_bit(NFS_INO_LAYOUTSTATS, &nfsi->flags);
smp_mb__after_atomic(); smp_mb__after_atomic();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment