mirror of https://gitee.com/openkylin/linux.git
staging: exfat: Fix logical operation continuation
Operators inside a multiline logical expression should be at the end of the line not at the beginning. This patch fixes two of those cases and remove an unnecessary parenthesis too, to comply in that way with the preferred coding style for the linux kernel. Suggested-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Frank A. Cancio Bello <frank@generalsoftwareinc.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Link: https://lore.kernel.org/r/ace2cbd5e4c03751fb522e7bbd60149e7ed969ae.1572666556.git.frank@generalsoftwareinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8a4e640eb7
commit
d3baf1e0b2
|
@ -2980,8 +2980,8 @@ static int exfat_setattr(struct dentry *dentry, struct iattr *attr)
|
||||||
|
|
||||||
pr_debug("%s entered\n", __func__);
|
pr_debug("%s entered\n", __func__);
|
||||||
|
|
||||||
if ((attr->ia_valid & ATTR_SIZE)
|
if ((attr->ia_valid & ATTR_SIZE) &&
|
||||||
&& (attr->ia_size > i_size_read(inode))) {
|
attr->ia_size > i_size_read(inode)) {
|
||||||
error = exfat_cont_expand(inode, attr->ia_size);
|
error = exfat_cont_expand(inode, attr->ia_size);
|
||||||
if (error || attr->ia_valid == ATTR_SIZE)
|
if (error || attr->ia_valid == ATTR_SIZE)
|
||||||
return error;
|
return error;
|
||||||
|
@ -2990,8 +2990,8 @@ static int exfat_setattr(struct dentry *dentry, struct iattr *attr)
|
||||||
|
|
||||||
ia_valid = attr->ia_valid;
|
ia_valid = attr->ia_valid;
|
||||||
|
|
||||||
if ((ia_valid & (ATTR_MTIME_SET | ATTR_ATIME_SET | ATTR_TIMES_SET))
|
if ((ia_valid & (ATTR_MTIME_SET | ATTR_ATIME_SET | ATTR_TIMES_SET)) &&
|
||||||
&& exfat_allow_set_time(sbi, inode)) {
|
exfat_allow_set_time(sbi, inode)) {
|
||||||
attr->ia_valid &= ~(ATTR_MTIME_SET |
|
attr->ia_valid &= ~(ATTR_MTIME_SET |
|
||||||
ATTR_ATIME_SET |
|
ATTR_ATIME_SET |
|
||||||
ATTR_TIMES_SET);
|
ATTR_TIMES_SET);
|
||||||
|
|
Loading…
Reference in New Issue