NFS: Fix O_DIRECT commit verifier handling
Instead of trying to save the commit verifiers and checking them against previous writes, adopt the same strategy as for buffered writes, of just checking the verifiers at commit time. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
@@ -544,6 +544,14 @@ nfs_write_verifier_cmp(const struct nfs_write_verifier *v1,
|
||||
return memcmp(v1->data, v2->data, sizeof(v1->data));
|
||||
}
|
||||
|
||||
static inline bool
|
||||
nfs_write_match_verf(const struct nfs_writeverf *verf,
|
||||
struct nfs_page *req)
|
||||
{
|
||||
return verf->committed > NFS_UNSTABLE &&
|
||||
!nfs_write_verifier_cmp(&req->wb_verf, &verf->verifier);
|
||||
}
|
||||
|
||||
/* unlink.c */
|
||||
extern struct rpc_task *
|
||||
nfs_async_rename(struct inode *old_dir, struct inode *new_dir,
|
||||
|
Reference in New Issue
Block a user