diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-02-14 03:03:16 +0100 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-02-14 03:03:16 +0100 |
commit | f4086a3d789dbe18949862276d83b8f49fce6d2f (patch) | |
tree | 4b4c65765c66e00397b14b1839ea775cb73e851e /fs/nfs/direct.c | |
parent | SUNRPC: Always manipulate rpc_rqst::rq_bc_pa_list under xprt->bc_pa_lock (diff) | |
download | linux-f4086a3d789dbe18949862276d83b8f49fce6d2f.tar.xz linux-f4086a3d789dbe18949862276d83b8f49fce6d2f.zip |
NFS: struct nfs_commit_info.lock must always point to inode->i_lock
Commit 411a99adffb4f (nfs: clear_request_commit while holding i_lock)
assumes that the nfs_commit_info always points to the inode->i_lock.
For historical reasons, that is not the case for O_DIRECT writes.
Cc: Weston Andros Adamson <dros@primarydata.com>
Fixes: 411a99adffb4f ("nfs: clear_request_commit while holding i_lock")
Cc: stable@vger.kernel.org # 3.17.x
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/direct.c')
-rw-r--r-- | fs/nfs/direct.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index 7077521acdf4..e907c8cf732e 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c @@ -283,7 +283,7 @@ static void nfs_direct_release_pages(struct page **pages, unsigned int npages) void nfs_init_cinfo_from_dreq(struct nfs_commit_info *cinfo, struct nfs_direct_req *dreq) { - cinfo->lock = &dreq->lock; + cinfo->lock = &dreq->inode->i_lock; cinfo->mds = &dreq->mds_cinfo; cinfo->ds = &dreq->ds_cinfo; cinfo->dreq = dreq; |