linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joel Becker <jlbec@evilplan.org>
To: Jan Kara <jack@suse.cz>
Cc: Al Viro <viro@ZenIV.linux.org.uk>,
	linux-fsdevel@vger.kernel.org, ocfs2-devel@oss.oracle.com
Subject: Re: [PATCH 3/3] ocfs2: Add freeze protection to ocfs2_file_splice_write()
Date: Thu, 7 Feb 2013 09:33:49 -0800	[thread overview]
Message-ID: <20130207173348.GA29575@localhost> (raw)
In-Reply-To: <1360248739-24836-4-git-send-email-jack@suse.cz>

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@evilplan.org>
> CC: ocfs2-devel@oss.oracle.com
> Signed-off-by: Jan Kara <jack@suse.cz>

Acked-by: Joel Becker <jlbec@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@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@evilplan.org

  reply	other threads:[~2013-02-07 17:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-07 14:52 [PATCH 0/3 RESEND] Fix hang of BSD accounting on frozen filesystem Jan Kara
2013-02-07 14:52 ` [PATCH 1/3] fs: Return EAGAIN when O_NONBLOCK write should block on frozen fs Jan Kara
2013-02-07 14:52 ` [PATCH 2/3] fs: Fix hang with BSD accounting on frozen filesystem Jan Kara
2013-02-07 14:52 ` [PATCH 3/3] ocfs2: Add freeze protection to ocfs2_file_splice_write() Jan Kara
2013-02-07 17:33   ` Joel Becker [this message]
2013-02-07 15:32 ` [PATCH 0/3 RESEND] Fix hang of BSD accounting on frozen filesystem Marco Stornelli
2013-02-07 15:43   ` Jan Kara
  -- strict thread matches above, loose matches on Subject: below --
2012-12-22  1:07 [PATCH 0/3 RESEND] Fix hang with BSD process accounting and fs freezing Jan Kara
2012-12-22  1:07 ` [PATCH 3/3] ocfs2: Add freeze protection to ocfs2_file_splice_write() Jan Kara
2012-11-12 11:17 [PATCH 1/3] fs: Return EAGAIN when O_NONBLOCK write should block on frozen fs Jan Kara
2012-11-12 11:17 ` [PATCH 3/3] ocfs2: Add freeze protection to ocfs2_file_splice_write() Jan Kara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130207173348.GA29575@localhost \
    --to=jlbec@evilplan.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=ocfs2-devel@oss.oracle.com \
    --cc=viro@ZenIV.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).