lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20130415120002.GD2299@quack.suse.cz>
Date:	Mon, 15 Apr 2013 14:00:02 +0200
From:	Jan Kara <jack@...e.cz>
To:	Marco Stornelli <marco.stornelli@...il.com>
Cc:	Linux FS Devel <linux-fsdevel@...r.kernel.org>,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	Al Viro <viro@...IV.linux.org.uk>, Jan Kara <jack@...e.cz>
Subject: Re: [PATCH 3/3] fsfreeze: use sb_start_write_killable instead of
 sb_start_write

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@...e.cz>

								Honza

> 
> Signed-off-by: Marco Stornelli <marco.stornelli@...il.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@...e.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ