X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fosd-ldiskfs%2Fosd_compat.c;h=cec04db5613bf6adf5b9dc36f4e571ca5ea83124;hp=d58b6c87ba7e432b3c37200b726db9bec9f5247c;hb=ae70c9e898b8230f26f659bfd85665230ea49720;hpb=8caff5d019674aea7d98e225d0136bf4694d5157 diff --git a/lustre/osd-ldiskfs/osd_compat.c b/lustre/osd-ldiskfs/osd_compat.c index d58b6c8..cec04db 100644 --- a/lustre/osd-ldiskfs/osd_compat.c +++ b/lustre/osd-ldiskfs/osd_compat.c @@ -421,13 +421,10 @@ cleanup_alloc: return rc; } -static void osd_seq_free(struct osd_obj_map *map, - struct osd_obj_seq *osd_seq) +static void osd_seq_free(struct osd_obj_seq *osd_seq) { int j; - list_del_init(&osd_seq->oos_seq_list); - if (osd_seq->oos_dirs) { for (j = 0; j < osd_seq->oos_subdir_count; j++) { if (osd_seq->oos_dirs[j]) @@ -456,7 +453,10 @@ static void osd_ost_fini(struct osd_device *osd) write_lock(&map->om_seq_list_lock); list_for_each_entry_safe(osd_seq, tmp, &map->om_seq_list, oos_seq_list) { - osd_seq_free(map, osd_seq); + list_del_init(&osd_seq->oos_seq_list); + write_unlock(&map->om_seq_list_lock); + osd_seq_free(osd_seq); + write_lock(&map->om_seq_list_lock); } write_unlock(&map->om_seq_list_lock); if (map->om_root)