From: Jan Kara Date: Wed, 20 Feb 2013 02:13:57 +0000 (+1100) Subject: ocfs2: add freeze protection to ocfs2_file_splice_write() X-Git-Tag: next-20130220~1^2~598 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8722d5d2d4d1975b0eef81b0a9844a94207d37e8;p=karo-tx-linux.git 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 --- 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; }