Whamcloud - gitweb
LU-18718 llite: cl_file_inode_init() only for regular file 57/58057/5
authorBobi Jam <bobijam@whamcloud.com>
Thu, 13 Feb 2025 07:37:10 +0000 (15:37 +0800)
committerOleg Drokin <green@whamcloud.com>
Fri, 28 Feb 2025 08:10:28 +0000 (08:10 +0000)
commit16b9bd70e1b6353c9f6850e3be91cb8255aec7e6
tree3e6ab783746a9de9087439de9e987ca56324a2f7
parent9f8f1e1847bbb9e26bcd47993cfa7486a4b8fb47
LU-18718 llite: cl_file_inode_init() only for regular file

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>
lustre/llite/lcommon_cl.c