summaryrefslogtreecommitdiffstats
path: root/fs/nfs/flexfilelayout
diff options
context:
space:
mode:
authorDave Wysochanski <dwysocha@redhat.com>2016-04-01 13:45:09 -0400
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2016-05-09 09:05:40 -0400
commitfe238e601d2519f259103ab65caea3b077ed7b39 (patch)
tree88b50933a24b69ccae24bb52f2f9bfb6b1dce2e7 /fs/nfs/flexfilelayout
parented3743a6d4f309f5278c87a69e3125382b78455c (diff)
downloadop-kernel-dev-fe238e601d2519f259103ab65caea3b077ed7b39.zip
op-kernel-dev-fe238e601d2519f259103ab65caea3b077ed7b39.tar.gz
NFS: Save struct inode * inside nfs_commit_info to clarify usage of i_lock
Commit ea2cf22 created nfs_commit_info and saved &inode->i_lock inside this NFS specific structure. This obscures the usage of i_lock. Instead, save struct inode * so later it's clear the spinlock taken is i_lock. Should be no functional change. Signed-off-by: Dave Wysochanski <dwysocha@redhat.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs/flexfilelayout')
-rw-r--r--fs/nfs/flexfilelayout/flexfilelayout.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c
index 0cb1abd..3b398f7 100644
--- a/fs/nfs/flexfilelayout/flexfilelayout.c
+++ b/fs/nfs/flexfilelayout/flexfilelayout.c
@@ -745,7 +745,7 @@ ff_layout_alloc_commit_info(struct pnfs_layout_segment *lseg,
else {
int i;
- spin_lock(cinfo->lock);
+ spin_lock(&cinfo->inode->i_lock);
if (cinfo->ds->nbuckets != 0)
kfree(buckets);
else {
@@ -759,7 +759,7 @@ ff_layout_alloc_commit_info(struct pnfs_layout_segment *lseg,
NFS_INVALID_STABLE_HOW;
}
}
- spin_unlock(cinfo->lock);
+ spin_unlock(&cinfo->inode->i_lock);
return 0;
}
}
OpenPOWER on IntegriCloud