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]
Date:	Mon, 12 Nov 2012 01:10:50 +0900
From:	OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
To:	Namjae Jeon <linkinjeon@...il.com>
Cc:	akpm@...ux-foundation.org, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Amit Sahrawat <amit.sahrawat83@...il.com>
Subject: Re: [PATCH 3/3] fat: remove unneeded compare condition for __fat_write_inode

Namjae Jeon <linkinjeon@...il.com> writes:

> In calling of __fat_write_inode(inode, wbc->sync_mode == WB_SYNC_ALL),
> expression "wbc->sync_mode == WB_SYNC_ALL" will always be equivalent to value
> of wbc->sync_mode. So, remove this additional compare condition from function
> arguments.

Current style is better. I.e. easy to add new sync mode.

> Signed-off-by: Namjae Jeon <linkinjeon@...il.com>
> Signed-off-by: Amit Sahrawat <amit.sahrawat83@...il.com>
> ---
>  fs/fat/inode.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/fat/inode.c b/fs/fat/inode.c
> index 7b186a5..aa0138b 100644
> --- a/fs/fat/inode.c
> +++ b/fs/fat/inode.c
> @@ -678,7 +678,7 @@ static int fat_write_inode(struct inode *inode, struct writeback_control *wbc)
>  		err = fat_clusters_flush(sb);
>  		mutex_unlock(&MSDOS_SB(sb)->s_lock);
>  	} else
> -		err = __fat_write_inode(inode, wbc->sync_mode == WB_SYNC_ALL);
> +		err = __fat_write_inode(inode, wbc->sync_mode);
>  
>  	return err;
>  }

-- 
OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
--
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