Skip to content

Commit e033fb5

Browse files
committed
pNFS/files: filelayout_write_done_cb must call nfs_writeback_update_inode()
All write callbacks are required to call nfs_writeback_update_inode() upon success to ensure that file size changes are recorded, and the attribute cache is invalidated. Signed-off-by: Trond Myklebust <[email protected]>
1 parent 10b7e9a commit e033fb5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

fs/nfs/filelayout/filelayout.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,12 @@ static int filelayout_write_done_cb(struct rpc_task *task,
357357
}
358358

359359
filelayout_set_layoutcommit(hdr);
360+
361+
/* zero out the fattr */
362+
hdr->fattr.valid = 0;
363+
if (task->tk_status >= 0)
364+
nfs_writeback_update_inode(hdr);
365+
360366
return 0;
361367
}
362368

0 commit comments

Comments
 (0)