[linux-cifs-client] Re: [PATCH] cifs: Fix missing braces in fs/cifs/inode.c

Jeff Layton jlayton at redhat.com
Fri Jun 20 11:37:31 GMT 2008


On Fri, 20 Jun 2008 16:33:27 +0530
Suresh Jayaraman <sjayaraman at suse.de> wrote:

> It seems commit cea218054ad277d6c126890213afde07b4eb1602 missed a set of
> braces. Cleaning up.
> 
> 
> Signed-off-by: Suresh Jayaraman<sjayaraman at suse.de>
> ---
> 
>  fs/cifs/inode.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
> index 722be54..764558a 100644
> --- a/fs/cifs/inode.c
> +++ b/fs/cifs/inode.c
> @@ -1310,10 +1310,11 @@ int cifs_revalidate(struct dentry *direntry)
>  /*		if (S_ISDIR(direntry->d_inode->i_mode))
>  			shrink_dcache_parent(direntry); */
>  		if (S_ISREG(direntry->d_inode->i_mode)) {
> -			if (direntry->d_inode->i_mapping)
> +			if (direntry->d_inode->i_mapping) {
>  				wbrc = filemap_fdatawait(direntry->d_inode->i_mapping);
>  				if (wbrc)
>  					CIFS_I(direntry->d_inode)->write_behind_rc = wbrc;
> +			}
>  			/* may eventually have to do this for open files too */
>  			if (list_empty(&(cifsInode->openFileList))) {
>  				/* changed on server - flush read ahead pages */
> 

Your patch looks good to me. I think the fact that we set wbrc to 0 in
the declaration keeps this from causing a real bug, but the braces
should be there.

Cheers,
-- 
Jeff Layton <jlayton at redhat.com>


More information about the linux-cifs-client mailing list