Useless (lock,waitqueue) pair killed - we have fs-wide
exclusion between renames enforced by VFS, so hfs rename_{lock,wait}
can be removed.
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 */
start_write(new_dir);
if (old_dir != new_dir) {
end_write(old_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;
}
512-byte blocks per
"allocation block" */
hfs_u16 attrib; /* Attribute word */
- hfs_wait_queue rename_wait;
- int rename_lock;
hfs_wait_queue bitmap_wait;
int bitmap_lock;
struct list_head entry_dirty;
mdb->magic = HFS_MDB_MAGIC;
mdb->sys_mdb = sys_mdb;
INIT_LIST_HEAD(&mdb->entry_dirty);
- hfs_init_waitqueue(&mdb->rename_wait);
hfs_init_waitqueue(&mdb->bitmap_wait);
/* See if this is an HFS filesystem */