Skip to content
Snippets Groups Projects
Commit 7d245f7f authored by Wang Di's avatar Wang Di
Browse files

Branch HEAD

In smfs_helper, replace list_for_each_entry_safe with list_for_each_entry,
because we may unplugin the plg list
parent 8d8c97fe
No related branches found
No related tags found
No related merge requests found
...@@ -533,20 +533,18 @@ int smfs_helper (struct super_block * sb, int op, void * msg) ...@@ -533,20 +533,18 @@ int smfs_helper (struct super_block * sb, int op, void * msg)
{ {
struct smfs_super_info *smb = S2SMI(sb); struct smfs_super_info *smb = S2SMI(sb);
struct list_head *hlist = &smb->smsi_plg_list; struct list_head *hlist = &smb->smsi_plg_list;
struct smfs_plugin *plg; struct smfs_plugin *plg, *plg_tmp;
int rc = 0; int rc = 0;
ENTRY; ENTRY;
LASSERT(op < PLG_HELPER_MAX); LASSERT(op < PLG_HELPER_MAX);
//call hook operations //call hook operations
list_for_each_entry(plg, hlist, plg_list) { list_for_each_entry_safe(plg, plg_tmp, hlist, plg_list) {
if (plg->plg_helper) if (plg->plg_helper)
rc += plg->plg_helper(op, sb, msg, plg->plg_private); rc += plg->plg_helper(op, sb, msg, plg->plg_private);
} }
EXIT; RETURN(rc);
return rc;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment