summaryrefslogtreecommitdiffstats
path: root/fs/nfs/pnfs.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2016-07-24 17:08:31 -0400
committerTrond Myklebust <trond.myklebust@primarydata.com>2016-07-24 17:08:31 -0400
commit362745268ce119c473952b30f57d947bdede7f7a (patch)
treed5632a60c88af58d77914c421ab11596b3c450f5 /fs/nfs/pnfs.c
parent7f94ed24958d790687296701175cc43a6027c6c5 (diff)
parente033fb51ebb2983ee17b4a1b96ccbaedb137d9e9 (diff)
downloadlinux-362745268ce119c473952b30f57d947bdede7f7a.tar.bz2
Merge branch 'writeback'
Diffstat (limited to 'fs/nfs/pnfs.c')
-rw-r--r--fs/nfs/pnfs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 7d992362ff04..4110c1dc8f68 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -2393,7 +2393,10 @@ pnfs_layoutcommit_inode(struct inode *inode, bool sync)
nfs_fattr_init(&data->fattr);
data->args.bitmask = NFS_SERVER(inode)->cache_consistency_bitmask;
data->res.fattr = &data->fattr;
- data->args.lastbytewritten = end_pos - 1;
+ if (end_pos != 0)
+ data->args.lastbytewritten = end_pos - 1;
+ else
+ data->args.lastbytewritten = U64_MAX;
data->res.server = NFS_SERVER(inode);
if (ld->prepare_layoutcommit) {