aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/inode.c12
-rw-r--r--fs/nfs/write.c24
2 files changed, 23 insertions, 13 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 7f9ecc46f3fb..89e98312599d 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -97,18 +97,6 @@ u64 nfs_compat_user_ino64(u64 fileid)
97 return ino; 97 return ino;
98} 98}
99 99
100int nfs_write_inode(struct inode *inode, struct writeback_control *wbc)
101{
102 int ret;
103
104 ret = nfs_commit_inode(inode,
105 wbc->sync_mode == WB_SYNC_ALL ? FLUSH_SYNC : 0);
106 if (ret >= 0)
107 return 0;
108 __mark_inode_dirty(inode, I_DIRTY_DATASYNC);
109 return ret;
110}
111
112void nfs_clear_inode(struct inode *inode) 100void nfs_clear_inode(struct inode *inode)
113{ 101{
114 /* 102 /*
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index d63d964a0392..09e97097baaa 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -1391,7 +1391,7 @@ static const struct rpc_call_ops nfs_commit_ops = {
1391 .rpc_release = nfs_commit_release, 1391 .rpc_release = nfs_commit_release,
1392}; 1392};
1393 1393
1394int nfs_commit_inode(struct inode *inode, int how) 1394static int nfs_commit_inode(struct inode *inode, int how)
1395{ 1395{
1396 LIST_HEAD(head); 1396 LIST_HEAD(head);
1397 int res; 1397 int res;
@@ -1406,13 +1406,35 @@ int nfs_commit_inode(struct inode *inode, int how)
1406 } 1406 }
1407 return res; 1407 return res;
1408} 1408}
1409
1410static int nfs_commit_unstable_pages(struct inode *inode, struct writeback_control *wbc)
1411{
1412 int ret;
1413
1414 ret = nfs_commit_inode(inode,
1415 wbc->sync_mode == WB_SYNC_ALL ? FLUSH_SYNC : 0);
1416 if (ret >= 0)
1417 return 0;
1418 __mark_inode_dirty(inode, I_DIRTY_DATASYNC);
1419 return ret;
1420}
1409#else 1421#else
1410static inline int nfs_commit_list(struct inode *inode, struct list_head *head, int how) 1422static inline int nfs_commit_list(struct inode *inode, struct list_head *head, int how)
1411{ 1423{
1412 return 0; 1424 return 0;
1413} 1425}
1426
1427static int nfs_commit_unstable_pages(struct inode *inode, struct writeback_control *wbc)
1428{
1429 return 0;
1430}
1414#endif 1431#endif
1415 1432
1433int nfs_write_inode(struct inode *inode, struct writeback_control *wbc)
1434{
1435 return nfs_commit_unstable_pages(inode, wbc);
1436}
1437
1416long nfs_sync_mapping_wait(struct address_space *mapping, struct writeback_control *wbc, int how) 1438long nfs_sync_mapping_wait(struct address_space *mapping, struct writeback_control *wbc, int how)
1417{ 1439{
1418 struct inode *inode = mapping->host; 1440 struct inode *inode = mapping->host;