aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/filelayout/filelayout.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/filelayout/filelayout.c')
-rw-r--r--fs/nfs/filelayout/filelayout.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfs/filelayout/filelayout.c b/fs/nfs/filelayout/filelayout.c
index 3384dc8e6683..3e50057eeadf 100644
--- a/fs/nfs/filelayout/filelayout.c
+++ b/fs/nfs/filelayout/filelayout.c
@@ -795,7 +795,7 @@ filelayout_alloc_commit_info(struct pnfs_layout_segment *lseg,
795 buckets[i].direct_verf.committed = NFS_INVALID_STABLE_HOW; 795 buckets[i].direct_verf.committed = NFS_INVALID_STABLE_HOW;
796 } 796 }
797 797
798 spin_lock(cinfo->lock); 798 spin_lock(&cinfo->inode->i_lock);
799 if (cinfo->ds->nbuckets >= size) 799 if (cinfo->ds->nbuckets >= size)
800 goto out; 800 goto out;
801 for (i = 0; i < cinfo->ds->nbuckets; i++) { 801 for (i = 0; i < cinfo->ds->nbuckets; i++) {
@@ -811,7 +811,7 @@ filelayout_alloc_commit_info(struct pnfs_layout_segment *lseg,
811 swap(cinfo->ds->buckets, buckets); 811 swap(cinfo->ds->buckets, buckets);
812 cinfo->ds->nbuckets = size; 812 cinfo->ds->nbuckets = size;
813out: 813out:
814 spin_unlock(cinfo->lock); 814 spin_unlock(&cinfo->inode->i_lock);
815 kfree(buckets); 815 kfree(buckets);
816 return 0; 816 return 0;
817} 817}