Commit d095bc9f authored by Bobi Jam's avatar Bobi Jam Committed by Greg Kroah-Hartman

staging: lustre: llite: return from ll_adjust_lum() if lump is NULL

No need to check several times if lump is NULL. Just test once and
return 0 if NULL.
Signed-off-by: default avatarBobi Jam <bobijam.xu@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9484
Reviewed-on: https://review.whamcloud.com/27126Reviewed-by: default avatarDmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: default avatarNiu Yawei <yawei.niu@intel.com>
Reviewed-by: default avatarJames Simmons <uja.ornl@yahoo.com>
Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a65e50c0
......@@ -190,15 +190,18 @@ static int ll_adjust_lum(struct inode *inode, struct lov_user_md *lump)
{
int rc = 0;
if (!lump)
return 0;
/* Attributes that are saved via getxattr will always have
* the stripe_offset as 0. Instead, the MDS should be
* allowed to pick the starting OST index. b=17846
*/
if (lump && lump->lmm_stripe_offset == 0)
if (lump->lmm_stripe_offset == 0)
lump->lmm_stripe_offset = -1;
/* Avoid anyone directly setting the RELEASED flag. */
if (lump && (lump->lmm_pattern & LOV_PATTERN_F_RELEASED)) {
if (lump->lmm_pattern & LOV_PATTERN_F_RELEASED) {
/* Only if we have a released flag check if the file
* was indeed archived.
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment