Commit 62297add authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] death of hfs rename_lock

	Useless (lock,waitqueue) pair killed - we have fs-wide
exclusion between renames enforced by VFS, so hfs rename_{lock,wait}
can be removed.
parent 6ccadfbb
...@@ -1346,13 +1346,6 @@ int hfs_cat_move(struct hfs_cat_entry *old_dir, struct hfs_cat_entry *new_dir, ...@@ -1346,13 +1346,6 @@ int hfs_cat_move(struct hfs_cat_entry *old_dir, struct hfs_cat_entry *new_dir,
return -EINVAL; return -EINVAL;
} }
while (mdb->rename_lock) {
hfs_sleep_on(&mdb->rename_wait);
}
spin_lock(&entry_lock);
mdb->rename_lock = 1; /* XXX: should be atomic_inc */
spin_unlock(&entry_lock);
/* keep readers from getting confused by changing dir size */ /* keep readers from getting confused by changing dir size */
start_write(new_dir); start_write(new_dir);
if (old_dir != new_dir) { if (old_dir != new_dir) {
...@@ -1567,11 +1560,6 @@ int hfs_cat_move(struct hfs_cat_entry *old_dir, struct hfs_cat_entry *new_dir, ...@@ -1567,11 +1560,6 @@ int hfs_cat_move(struct hfs_cat_entry *old_dir, struct hfs_cat_entry *new_dir,
end_write(old_dir); end_write(old_dir);
} }
end_write(new_dir); end_write(new_dir);
spin_lock(&entry_lock);
mdb->rename_lock = 0; /* XXX: should use atomic_dec */
hfs_wake_up(&mdb->rename_wait);
spin_unlock(&entry_lock);
return error; return error;
} }
......
...@@ -271,8 +271,6 @@ struct hfs_mdb { ...@@ -271,8 +271,6 @@ struct hfs_mdb {
512-byte blocks per 512-byte blocks per
"allocation block" */ "allocation block" */
hfs_u16 attrib; /* Attribute word */ hfs_u16 attrib; /* Attribute word */
hfs_wait_queue rename_wait;
int rename_lock;
hfs_wait_queue bitmap_wait; hfs_wait_queue bitmap_wait;
int bitmap_lock; int bitmap_lock;
struct list_head entry_dirty; struct list_head entry_dirty;
......
...@@ -100,7 +100,6 @@ struct hfs_mdb *hfs_mdb_get(hfs_sysmdb sys_mdb, int readonly, ...@@ -100,7 +100,6 @@ struct hfs_mdb *hfs_mdb_get(hfs_sysmdb sys_mdb, int readonly,
mdb->magic = HFS_MDB_MAGIC; mdb->magic = HFS_MDB_MAGIC;
mdb->sys_mdb = sys_mdb; mdb->sys_mdb = sys_mdb;
INIT_LIST_HEAD(&mdb->entry_dirty); INIT_LIST_HEAD(&mdb->entry_dirty);
hfs_init_waitqueue(&mdb->rename_wait);
hfs_init_waitqueue(&mdb->bitmap_wait); hfs_init_waitqueue(&mdb->bitmap_wait);
/* See if this is an HFS filesystem */ /* See if this is an HFS filesystem */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment