diff options
author | Bryan Schumaker <bjschuma@netapp.com> | 2012-06-20 21:53:49 +0200 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-06-29 17:46:47 +0200 |
commit | a8d8f02cf0c379693762107afe812b9e52090e39 (patch) | |
tree | 85a9f40330bc059df32ecc38b10171d0b45e63fb /fs/nfs/write.c | |
parent | NFS: Create an write_pageio_init() function (diff) | |
download | linux-a8d8f02cf0c379693762107afe812b9e52090e39.tar.xz linux-a8d8f02cf0c379693762107afe812b9e52090e39.zip |
NFS: Create custom NFS v4 write_inode() function
This gives pnfs a chance to do a layout commit inside the v4 code.
Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r-- | fs/nfs/write.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index c11fb0025f0b..f312860c15d0 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -1671,9 +1671,14 @@ static int nfs_commit_unstable_pages(struct inode *inode, struct writeback_contr int nfs_write_inode(struct inode *inode, struct writeback_control *wbc) { - int ret; + return nfs_commit_unstable_pages(inode, wbc); +} + +#ifdef CONFIG_NFS_V4 +int nfs4_write_inode(struct inode *inode, struct writeback_control *wbc) +{ + int ret = nfs_write_inode(inode, wbc); - ret = nfs_commit_unstable_pages(inode, wbc); if (ret >= 0 && test_bit(NFS_INO_LAYOUTCOMMIT, &NFS_I(inode)->flags)) { int status; bool sync = true; @@ -1687,6 +1692,7 @@ int nfs_write_inode(struct inode *inode, struct writeback_control *wbc) } return ret; } +#endif /* * flush the inode to disk. |