On 4/1/20 7:26 PM, xiakaixu1987@xxxxxxxxx wrote: > From: Kaixu Xia <kaixuxia@xxxxxxxxxxx> > > The two if statements have same condition, and the mask value > does not change in xfs_setattr_nonsize(), so combine them. > > Signed-off-by: Kaixu Xia <kaixuxia@xxxxxxxxxxx> Prior to the commit c4ed4243c40f ("xfs: split xfs_setattr") xfs_setattr() had truncate handling in between two identical changing file ownership ifs. Since then truncate code is moved out of xfs_setattr() and mask value stays the same in the first if, it make sense to combine these two ifs. Looks good to me. Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>