diff options
author | Christoph Hellwig <hch@lst.de> | 2010-03-05 03:21:37 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-03-05 13:25:52 -0500 |
commit | a9185b41a4f84971b930c519f0c63bd450c4810d (patch) | |
tree | 268cf4e206cca12fb9e1dd68984e7c190e465b46 /fs/sysv/inode.c | |
parent | 26821ed40b4230259e770c9911180f38fcaa6f59 (diff) |
pass writeback_control to ->write_inode
This gives the filesystem more information about the writeback that
is happening. Trond requested this for the NFS unstable write handling,
and other filesystems might benefit from this too by beeing able to
distinguish between the different callers in more detail.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/sysv/inode.c')
-rw-r--r-- | fs/sysv/inode.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/sysv/inode.c b/fs/sysv/inode.c index 9824743832a7..4573734d723d 100644 --- a/fs/sysv/inode.c +++ b/fs/sysv/inode.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
27 | #include <linux/buffer_head.h> | 27 | #include <linux/buffer_head.h> |
28 | #include <linux/vfs.h> | 28 | #include <linux/vfs.h> |
29 | #include <linux/writeback.h> | ||
29 | #include <linux/namei.h> | 30 | #include <linux/namei.h> |
30 | #include <asm/byteorder.h> | 31 | #include <asm/byteorder.h> |
31 | #include "sysv.h" | 32 | #include "sysv.h" |
@@ -246,7 +247,7 @@ bad_inode: | |||
246 | return ERR_PTR(-EIO); | 247 | return ERR_PTR(-EIO); |
247 | } | 248 | } |
248 | 249 | ||
249 | int sysv_write_inode(struct inode *inode, int wait) | 250 | static int __sysv_write_inode(struct inode *inode, int wait) |
250 | { | 251 | { |
251 | struct super_block * sb = inode->i_sb; | 252 | struct super_block * sb = inode->i_sb; |
252 | struct sysv_sb_info * sbi = SYSV_SB(sb); | 253 | struct sysv_sb_info * sbi = SYSV_SB(sb); |
@@ -296,9 +297,14 @@ int sysv_write_inode(struct inode *inode, int wait) | |||
296 | return 0; | 297 | return 0; |
297 | } | 298 | } |
298 | 299 | ||
300 | int sysv_write_inode(struct inode *inode, struct writeback_control *wbc) | ||
301 | { | ||
302 | return __sysv_write_inode(inode, wbc->sync_mode == WB_SYNC_ALL); | ||
303 | } | ||
304 | |||
299 | int sysv_sync_inode(struct inode *inode) | 305 | int sysv_sync_inode(struct inode *inode) |
300 | { | 306 | { |
301 | return sysv_write_inode(inode, 1); | 307 | return __sysv_write_inode(inode, 1); |
302 | } | 308 | } |
303 | 309 | ||
304 | static void sysv_delete_inode(struct inode *inode) | 310 | static void sysv_delete_inode(struct inode *inode) |