Skip to content

Commit 8221b34

Browse files
Justin Teemartinkpetersen
authored andcommitted
scsi: lpfc: Clean up extraneous phba dentries
Because debugfs_remove recursively removes debugfs entries, the lpfc_debugfs_terminate routine is updated to remove only the parent/root debugfs directories. As such, there no longer is a need to keep track of each individual debugfs entry so clean up the unused phba dentries. Reported-by: Al Viro <viro@zeniv.linux.org.uk> Closes: https://lore.kernel.org/linux-fsdevel/20250702212917.GK3406663@ZenIV/ Signed-off-by: Justin Tee <justin.tee@broadcom.com> Message-ID: <20250915180811.137530-12-justintee8345@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 5d7ef44 commit 8221b34

2 files changed

Lines changed: 124 additions & 390 deletions

File tree

drivers/scsi/lpfc/lpfc.h

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -741,12 +741,6 @@ struct lpfc_vport {
741741
struct lpfc_vmid_priority_info vmid_priority;
742742

743743
#ifdef CONFIG_SCSI_LPFC_DEBUG_FS
744-
struct dentry *debug_disc_trc;
745-
struct dentry *debug_nodelist;
746-
struct dentry *debug_nvmestat;
747-
struct dentry *debug_scsistat;
748-
struct dentry *debug_ioktime;
749-
struct dentry *debug_hdwqstat;
750744
struct dentry *vport_debugfs_root;
751745
struct lpfc_debugfs_trc *disc_trc;
752746
atomic_t disc_trc_cnt;
@@ -1339,29 +1333,8 @@ struct lpfc_hba {
13391333
#ifdef CONFIG_SCSI_LPFC_DEBUG_FS
13401334
struct dentry *hba_debugfs_root;
13411335
atomic_t debugfs_vport_count;
1342-
struct dentry *debug_multixri_pools;
1343-
struct dentry *debug_hbqinfo;
1344-
struct dentry *debug_dumpHostSlim;
1345-
struct dentry *debug_dumpHBASlim;
1346-
struct dentry *debug_InjErrLBA; /* LBA to inject errors at */
1347-
struct dentry *debug_InjErrNPortID; /* NPortID to inject errors at */
1348-
struct dentry *debug_InjErrWWPN; /* WWPN to inject errors at */
1349-
struct dentry *debug_writeGuard; /* inject write guard_tag errors */
1350-
struct dentry *debug_writeApp; /* inject write app_tag errors */
1351-
struct dentry *debug_writeRef; /* inject write ref_tag errors */
1352-
struct dentry *debug_readGuard; /* inject read guard_tag errors */
1353-
struct dentry *debug_readApp; /* inject read app_tag errors */
1354-
struct dentry *debug_readRef; /* inject read ref_tag errors */
1355-
1356-
struct dentry *debug_nvmeio_trc;
1336+
13571337
struct lpfc_debugfs_nvmeio_trc *nvmeio_trc;
1358-
struct dentry *debug_hdwqinfo;
1359-
#ifdef LPFC_HDWQ_LOCK_STAT
1360-
struct dentry *debug_lockstat;
1361-
#endif
1362-
struct dentry *debug_cgn_buffer;
1363-
struct dentry *debug_rx_monitor;
1364-
struct dentry *debug_ras_log;
13651338
atomic_t nvmeio_trc_cnt;
13661339
uint32_t nvmeio_trc_size;
13671340
uint32_t nvmeio_trc_output_idx;
@@ -1378,19 +1351,10 @@ struct lpfc_hba {
13781351
sector_t lpfc_injerr_lba;
13791352
#define LPFC_INJERR_LBA_OFF (sector_t)(-1)
13801353

1381-
struct dentry *debug_slow_ring_trc;
13821354
struct lpfc_debugfs_trc *slow_ring_trc;
13831355
atomic_t slow_ring_trc_cnt;
13841356
/* iDiag debugfs sub-directory */
13851357
struct dentry *idiag_root;
1386-
struct dentry *idiag_pci_cfg;
1387-
struct dentry *idiag_bar_acc;
1388-
struct dentry *idiag_que_info;
1389-
struct dentry *idiag_que_acc;
1390-
struct dentry *idiag_drb_acc;
1391-
struct dentry *idiag_ctl_acc;
1392-
struct dentry *idiag_mbx_acc;
1393-
struct dentry *idiag_ext_acc;
13941358
uint8_t lpfc_idiag_last_eq;
13951359
#endif
13961360
uint16_t nvmeio_trc_on;

0 commit comments

Comments
 (0)