diff options
author | Weston Andros Adamson <dros@primarydata.com> | 2014-07-17 20:42:19 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2014-08-03 17:05:26 -0400 |
commit | 411a99adffb4f993eee29759f744de01487044ac (patch) | |
tree | cea4af52189a179a8001d5ae5c2d5ed28bd5f7d7 /fs/nfs/filelayout | |
parent | e6cf82d1830f5e16a10d566f58db70f297ba5da8 (diff) | |
download | linux-exynos-411a99adffb4f993eee29759f744de01487044ac.tar.gz linux-exynos-411a99adffb4f993eee29759f744de01487044ac.tar.bz2 linux-exynos-411a99adffb4f993eee29759f744de01487044ac.zip |
nfs: clear_request_commit while holding i_lock
Signed-off-by: Weston Andros Adamson <dros@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/filelayout')
-rw-r--r-- | fs/nfs/filelayout/filelayout.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/nfs/filelayout/filelayout.c b/fs/nfs/filelayout/filelayout.c index 524e66f6bb9c..1359c4a27393 100644 --- a/fs/nfs/filelayout/filelayout.c +++ b/fs/nfs/filelayout/filelayout.c @@ -1009,6 +1009,7 @@ static u32 select_bucket_index(struct nfs4_filelayout_segment *fl, u32 j) /* The generic layer is about to remove the req from the commit list. * If this will make the bucket empty, it will need to put the lseg reference. + * Note this is must be called holding the inode (/cinfo) lock */ static void filelayout_clear_request_commit(struct nfs_page *req, @@ -1016,7 +1017,6 @@ filelayout_clear_request_commit(struct nfs_page *req, { struct pnfs_layout_segment *freeme = NULL; - spin_lock(cinfo->lock); if (!test_and_clear_bit(PG_COMMIT_TO_DS, &req->wb_flags)) goto out; cinfo->ds->nwritten--; @@ -1031,8 +1031,7 @@ filelayout_clear_request_commit(struct nfs_page *req, } out: nfs_request_remove_commit_list(req, cinfo); - spin_unlock(cinfo->lock); - pnfs_put_lseg(freeme); + pnfs_put_lseg_async(freeme); } static void |