From 8722d5d2d4d1975b0eef81b0a9844a94207d37e8 Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Wed, 20 Feb 2013 13:13:57 +1100 Subject: [PATCH] ocfs2: add freeze protection to ocfs2_file_splice_write() ocfs2_file_splice_write() was missed when adding freeze protection to all write paths. Fix that. Signed-off-by: Jan Kara Acked-by: Joel Becker Cc: Mark Fasheh Cc: Al Viro Cc: Nikola Ciprich Cc: Marco Stornelli Signed-off-by: Andrew Morton --- fs/ocfs2/file.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index b5fc161bce79..ddb5b03646ba 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -2469,6 +2469,9 @@ static ssize_t ocfs2_file_splice_write(struct pipe_inode_info *pipe, out->f_path.dentry->d_name.len, out->f_path.dentry->d_name.name, len); + if (!sb_start_file_write(out)) + return -EAGAIN; + if (pipe->inode) mutex_lock_nested(&pipe->inode->i_mutex, I_MUTEX_PARENT); @@ -2507,6 +2510,7 @@ static ssize_t ocfs2_file_splice_write(struct pipe_inode_info *pipe, balance_dirty_pages_ratelimited(mapping); } + sb_end_write(inode->i_sb); return ret; } -- 2.39.5