Skip to content

Commit b359f9d

Browse files
Fred IsamanTrond Myklebust
authored andcommitted
NFS: add dreq to nfs_commit_info
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>
1 parent f453a54 commit b359f9d

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

fs/nfs/write.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,7 @@ static void nfs_init_cinfo_from_inode(struct nfs_commit_info *cinfo,
506506
cinfo->lock = &inode->i_lock;
507507
cinfo->mds = &NFS_I(inode)->commit_info;
508508
cinfo->ds = pnfs_get_ds_info(inode);
509+
cinfo->dreq = NULL;
509510
cinfo->completion_ops = &nfs_commit_completion_ops;
510511
}
511512

@@ -1431,6 +1432,7 @@ void nfs_init_commit(struct nfs_commit_data *data,
14311432
data->lseg = lseg; /* reference transferred */
14321433
data->mds_ops = &nfs_commit_ops;
14331434
data->completion_ops = cinfo->completion_ops;
1435+
data->dreq = cinfo->dreq;
14341436

14351437
data->args.fh = NFS_FH(data->inode);
14361438
/* Note: we always request a commit of the entire inode */

include/linux/nfs_xdr.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,6 +1274,7 @@ struct nfs_commit_info {
12741274
spinlock_t *lock;
12751275
struct nfs_mds_commit_info *mds;
12761276
struct pnfs_ds_commit_info *ds;
1277+
struct nfs_direct_req *dreq; /* O_DIRECT request */
12771278
const struct nfs_commit_completion_ops *completion_ops;
12781279
};
12791280

0 commit comments

Comments
 (0)