linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Marco Stornelli <marco.stornelli@gmail.com>
Cc: Linux FS Devel <linux-fsdevel@vger.kernel.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Al Viro <viro@ZenIV.linux.org.uk>, Jan Kara <jack@suse.cz>
Subject: Re: [PATCH 3/3] fsfreeze: use sb_start_write_killable instead of sb_start_write
Date: Mon, 15 Apr 2013 14:00:02 +0200	[thread overview]
Message-ID: <20130415120002.GD2299@quack.suse.cz> (raw)
In-Reply-To: <5169359A.4090709@gmail.com>

On Sat 13-04-13 12:38:18, Marco Stornelli wrote:
> Replace sb_start_write with sb_start_write_killable where
> possible.
  Looks good. You can add:
Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> 
> Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
> ---
>  fs/open.c |    8 ++++++--
>  1 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/open.c b/fs/open.c
> index 8c74100..d621d76 100644
> --- a/fs/open.c
> +++ b/fs/open.c
> @@ -182,7 +182,9 @@ static long do_sys_ftruncate(unsigned int fd, loff_t length, int small)
>  	if (IS_APPEND(inode))
>  		goto out_putf;
>  
> -	sb_start_write(inode->i_sb);
> +	error = sb_start_write_killable(inode->i_sb);
> +	if (error < 0)
> +		return error;
>  	error = locks_verify_truncate(inode, f.file, length);
>  	if (!error)
>  		error = security_path_truncate(&f.file->f_path);
> @@ -273,7 +275,9 @@ int do_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
>  	if (!file->f_op->fallocate)
>  		return -EOPNOTSUPP;
>  
> -	sb_start_write(inode->i_sb);
> +	ret = sb_start_write_killable(inode->i_sb);
> +	if (ret < 0)
> +		return ret;
>  	ret = file->f_op->fallocate(file, mode, offset, len);
>  	sb_end_write(inode->i_sb);
>  	return ret;
> -- 
> 1.7.3.4
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

      reply	other threads:[~2013-04-15 12:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-13 10:38 [PATCH 3/3] fsfreeze: use sb_start_write_killable instead of sb_start_write Marco Stornelli
2013-04-15 12:00 ` Jan Kara [this message]

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=20130415120002.GD2299@quack.suse.cz \
    --to=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marco.stornelli@gmail.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).