NFS: add dreq to nfs_commit_info
authorFred Isaman <iisaman@netapp.com>
Fri, 20 Apr 2012 18:47:55 +0000 (14:47 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 27 Apr 2012 18:10:38 +0000 (14:10 -0400)
Need this to pass into nfs_commitdata_init, in order to keep data->dreq
accurate.

Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/write.c
include/linux/nfs_xdr.h

index 333d01d26292f43306da12fe3b683e786366e84b..44a93d8c7b52dd6470d907464d256736f21b8e1d 100644 (file)
@@ -506,6 +506,7 @@ static void nfs_init_cinfo_from_inode(struct nfs_commit_info *cinfo,
        cinfo->lock = &inode->i_lock;
        cinfo->mds = &NFS_I(inode)->commit_info;
        cinfo->ds = pnfs_get_ds_info(inode);
+       cinfo->dreq = NULL;
        cinfo->completion_ops = &nfs_commit_completion_ops;
 }
 
@@ -1431,6 +1432,7 @@ void nfs_init_commit(struct nfs_commit_data *data,
        data->lseg        = lseg; /* reference transferred */
        data->mds_ops     = &nfs_commit_ops;
        data->completion_ops = cinfo->completion_ops;
+       data->dreq        = cinfo->dreq;
 
        data->args.fh     = NFS_FH(data->inode);
        /* Note: we always request a commit of the entire inode */
index 0e8b88ad9ae2ca4181eb7cf2587b183c9b733f57..5f563bd113e8a99f19a4fbc72f13d0b8b0c12836 100644 (file)
@@ -1274,6 +1274,7 @@ struct nfs_commit_info {
        spinlock_t                      *lock;
        struct nfs_mds_commit_info      *mds;
        struct pnfs_ds_commit_info      *ds;
+       struct nfs_direct_req           *dreq;  /* O_DIRECT request */
        const struct nfs_commit_completion_ops *completion_ops;
 };