cl_file_inode_init() only applies to regular files, so we'd avoid
LBUG-ing it if the pre-condition is not met.
cl_file_inode_init()) ASSERTION((((inode->i_mode) &
00170000)
== 0100000)) failed:
Call Trace:
dump_stack+0x41/0x60
lbug_with_loc.cold.8+0x5/0x58 [libcfs]
cl_file_inode_init+0x216/0x390 [lustre]
ll_update_inode+0x44f/0x710 [lustre]
ll_iget+0x228/0x320 [lustre]
ll_prep_inode+0x3e5/0xa10 [lustre]
ll_lookup_it_finish.constprop.32+0xce/0x10a0 [lustre]
ll_lookup_it+0x82f/0x1840 [lustre]
ll_lookup_nd+0x112/0x1c0 [lustre]
__lookup_hash+0x75/0xa0
do_unlinkat+0x156/0x300
do_syscall_64+0x5b/0x1a0
entry_SYSCALL_64_after_hwframe+0x66/0xcb
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I7fef2645ef040cb3c3fd6e4ece062e1c9ab64327
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58057
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
int result = 0;
__u16 refcheck;
- LASSERT(md->body->mbo_valid & OBD_MD_FLID);
- LASSERT(S_ISREG(inode->i_mode));
+ if (!(md->body->mbo_valid & OBD_MD_FLID) || !S_ISREG(inode->i_mode))
+ return 0;
env = cl_env_get(&refcheck);
if (IS_ERR(env))