From: Jan Kara Date: Tue, 18 Aug 2009 16:38:45 +0000 (+0200) Subject: pohmelfs: Use new syncing helper X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=aa3caafe53cab7ef60605e481cd5d7943e1c3022;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git pohmelfs: Use new syncing helper Use new generic_write_sync() helper instead of sync_page_range(). Acked-by: Evgeniy Polyakov Signed-off-by: Jan Kara --- diff --git a/drivers/staging/pohmelfs/inode.c b/drivers/staging/pohmelfs/inode.c index e9d41e439aa7..d004a9ddddbc 100644 --- a/drivers/staging/pohmelfs/inode.c +++ b/drivers/staging/pohmelfs/inode.c @@ -927,10 +927,10 @@ ssize_t pohmelfs_write(struct file *file, const char __user *buf, mutex_unlock(&inode->i_mutex); WARN_ON(ret < 0); - if (ret > 0 && ((file->f_flags & O_SYNC) || IS_SYNC(inode))) { + if (ret > 0) { ssize_t err; - err = sync_page_range(inode, mapping, pos, ret); + err = generic_write_sync(file, pos, ret); if (err < 0) ret = err; WARN_ON(ret < 0);