Re: [patch] Staging: lustre: missing curly braces in ll_setattr_raw()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ah! 
Nice catch.
I am not sure how I missed that while making 178ba1e0d00aca671f9a8f5f41d28fc0fe717752, it's also strange that this never triggered any ill effects in any of my testing.

Thanks!

On Feb 25, 2015, at 8:20 AM, Dan Carpenter wrote:

> From the indenting, it looks like curly braces were intended here.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> ---
> This is not tested, and it changes how the code works.  Please review
> it a bit carefully.  Sometimes people just do weird indenting for no
> reason.
> 
> diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c
> index 0c1b583..ba97d9e 100644
> --- a/drivers/staging/lustre/lustre/llite/llite_lib.c
> +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c
> @@ -1432,7 +1432,7 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import)
> 
> 	if (attr->ia_valid & (ATTR_SIZE |
> 			      ATTR_ATIME | ATTR_ATIME_SET |
> -			      ATTR_MTIME | ATTR_MTIME_SET))
> +			      ATTR_MTIME | ATTR_MTIME_SET)) {
> 		/* For truncate and utimes sending attributes to OSTs, setting
> 		 * mtime/atime to the past will be performed under PW [0:EOF]
> 		 * extent lock (new_size:EOF for truncate).  It may seem
> @@ -1444,6 +1444,7 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import)
> 		rc = ll_setattr_ost(inode, attr);
> 		if (attr->ia_valid & ATTR_SIZE)
> 			up_write(&lli->lli_trunc_sem);
> +	}
> out:
> 	if (op_data) {
> 		if (op_data->op_ioepoch) {

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux