Jan Kara
2013-Feb-07 14:52 UTC
[Ocfs2-devel] [PATCH 3/3] 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. CC: Joel Becker <jlbec at evilplan.org> CC: ocfs2-devel at oss.oracle.com Signed-off-by: Jan Kara <jack at suse.cz> --- fs/ocfs2/file.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 3898499..1f6916c 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -2468,6 +2468,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); @@ -2506,6 +2509,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; } -- 1.7.1
Joel Becker
2013-Feb-07 17:33 UTC
[Ocfs2-devel] [PATCH 3/3] ocfs2: Add freeze protection to ocfs2_file_splice_write()
On Thu, Feb 07, 2013 at 03:52:19PM +0100, Jan Kara wrote:> ocfs2_file_splice_write() was missed when adding freeze protection to all > write paths. Fix that. > > CC: Joel Becker <jlbec at evilplan.org> > CC: ocfs2-devel at oss.oracle.com > Signed-off-by: Jan Kara <jack at suse.cz>Acked-by: Joel Becker <jlbec at evilplan.org>> --- > fs/ocfs2/file.c | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c > index 3898499..1f6916c 100644 > --- a/fs/ocfs2/file.c > +++ b/fs/ocfs2/file.c > @@ -2468,6 +2468,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); > > @@ -2506,6 +2509,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; > } > -- > 1.7.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in > the body of a message to majordomo at vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html-- "Ninety feet between bases is perhaps as close as man has ever come to perfection." - Red Smith http://www.jlbec.org/ jlbec at evilplan.org
Possibly Parallel Threads
- [PATCH 3/3] ocfs2: Add freeze protection to ocfs2_file_splice_write()
- [PATCH v21 22/30] ocfs2: Provide a splice-read stub
- [PATCH 1/4] ocfs2: Fixes pipe_buf_operations->pin switch to confirm in 2.6.23.
- [PATCH 1/3] VFS/ioctl: Add punching-hole support to ioctl().
- [PATCH 1/3] VFS/ioctl: Add punching-hole support to ioctl().