aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/write.c
diff options
context:
space:
mode:
authorBryan Schumaker <bjschuma@netapp.com>2012-06-20 15:53:49 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-06-29 11:46:47 -0400
commita8d8f02cf0c379693762107afe812b9e52090e39 (patch)
tree85a9f40330bc059df32ecc38b10171d0b45e63fb /fs/nfs/write.c
parent57208fa7e51ca16cd68de8e8bf482f16b06d3ea1 (diff)
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.c10
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
1671 1671
1672int nfs_write_inode(struct inode *inode, struct writeback_control *wbc) 1672int nfs_write_inode(struct inode *inode, struct writeback_control *wbc)
1673{ 1673{
1674 int ret; 1674 return nfs_commit_unstable_pages(inode, wbc);
1675}
1676
1677#ifdef CONFIG_NFS_V4
1678int nfs4_write_inode(struct inode *inode, struct writeback_control *wbc)
1679{
1680 int ret = nfs_write_inode(inode, wbc);
1675 1681
1676 ret = nfs_commit_unstable_pages(inode, wbc);
1677 if (ret >= 0 && test_bit(NFS_INO_LAYOUTCOMMIT, &NFS_I(inode)->flags)) { 1682 if (ret >= 0 && test_bit(NFS_INO_LAYOUTCOMMIT, &NFS_I(inode)->flags)) {
1678 int status; 1683 int status;
1679 bool sync = true; 1684 bool sync = true;
@@ -1687,6 +1692,7 @@ int nfs_write_inode(struct inode *inode, struct writeback_control *wbc)
1687 } 1692 }
1688 return ret; 1693 return ret;
1689} 1694}
1695#endif
1690 1696
1691/* 1697/*
1692 * flush the inode to disk. 1698 * flush the inode to disk.