From: Jan Kara Date: Sun, 10 Mar 2013 10:54:40 +0000 (+1100) Subject: ocfs2: add freeze protection to ocfs2_file_splice_write() X-Git-Tag: next-20130312~3^2~249 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4b83f0e2ba5e3eed5ec79f920f88a005337b5400;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 94b9b232c494..859cef7e8b4a 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; }