diff options
author | Christoph Hellwig <hch@lst.de> | 2010-10-06 08:48:20 (GMT) |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-10-26 01:18:19 (GMT) |
commit | c37650161a53c01ddd88587675f9a4adc909a73e (patch) | |
tree | 85821998de9a6723dedc42488b9491db9692d1e3 /fs/exofs | |
parent | 81fca444001e5a41ab80ce8cf9a5734c00ec6546 (diff) | |
download | linux-fsl-qoriq-c37650161a53c01ddd88587675f9a4adc909a73e.tar.xz |
fs: add sync_inode_metadata
Add a new helper to write out the inode using the writeback code,
that is including the correct dirty bit and list manipulation. A few
of filesystems already opencode this, and a lot of others should be
using it instead of using write_inode_now which also writes out the
data.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/exofs')
-rw-r--r-- | fs/exofs/file.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/exofs/file.c b/fs/exofs/file.c index 68cb23e..b905c79 100644 --- a/fs/exofs/file.c +++ b/fs/exofs/file.c @@ -46,10 +46,6 @@ static int exofs_file_fsync(struct file *filp, int datasync) { int ret; struct inode *inode = filp->f_mapping->host; - struct writeback_control wbc = { - .sync_mode = WB_SYNC_ALL, - .nr_to_write = 0, /* metadata-only; caller takes care of data */ - }; struct super_block *sb; if (!(inode->i_state & I_DIRTY)) @@ -57,7 +53,7 @@ static int exofs_file_fsync(struct file *filp, int datasync) if (datasync && !(inode->i_state & I_DIRTY_DATASYNC)) return 0; - ret = sync_inode(inode, &wbc); + ret = sync_inode_metadata(inode, 1); /* This is a good place to write the sb */ /* TODO: Sechedule an sb-sync on create */ |