aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfs/catalog.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-05-12 20:13:50 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2016-05-12 20:13:50 -0400
commit9717a91b01feda644f45fd63624a641385ef8f2d (patch)
treec2abccf2e761596b361146de3041143f7db21c29 /fs/hfs/catalog.c
parent323ee8fc544d407eb053471b9607f95f987f5f12 (diff)
hfs: switch to ->iterate_shared()
exact parallel of hfsplus analogue Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/hfs/catalog.c')
-rw-r--r--fs/hfs/catalog.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/hfs/catalog.c b/fs/hfs/catalog.c
index 1eb5d415d434..98cde8ba5dc2 100644
--- a/fs/hfs/catalog.c
+++ b/fs/hfs/catalog.c
@@ -240,10 +240,13 @@ int hfs_cat_delete(u32 cnid, struct inode *dir, struct qstr *str)
240 } 240 }
241 } 241 }
242 242
243 /* we only need to take spinlock for exclusion with ->release() */
244 spin_lock(&HFS_I(dir)->open_dir_lock);
243 list_for_each_entry(rd, &HFS_I(dir)->open_dir_list, list) { 245 list_for_each_entry(rd, &HFS_I(dir)->open_dir_list, list) {
244 if (fd.tree->keycmp(fd.search_key, (void *)&rd->key) < 0) 246 if (fd.tree->keycmp(fd.search_key, (void *)&rd->key) < 0)
245 rd->file->f_pos--; 247 rd->file->f_pos--;
246 } 248 }
249 spin_unlock(&HFS_I(dir)->open_dir_lock);
247 250
248 res = hfs_brec_remove(&fd); 251 res = hfs_brec_remove(&fd);
249 if (res) 252 if (res)