Staging: lustre: missing curly braces in ll_setattr_raw()
Subsystems (2)
PATCH 1/1 Staging: lustre: missing curly braces in ll_setattr_raw()
From the indenting, it looks like curly braces were intended here.
Signed-off-by Dan Carpenter <[email protected]>
---
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.
drivers/staging/lustre/lustre/llite/llite_lib.c +2 -1
@@ -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) {
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!
Quoted 29 lines · Dan Carpenter
From the indenting, it looks like curly braces were intended here.
Signed-off-by Dan Carpenter <[email protected]>---
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.drivers/staging/lustre/lustre/llite/llite_lib.c +2
-1@@ -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) {