]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] death of hfs rename_lock
authorAlexander Viro <viro@math.psu.edu>
Wed, 6 Feb 2002 02:46:49 +0000 (18:46 -0800)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Wed, 6 Feb 2002 02:46:49 +0000 (18:46 -0800)
Useless (lock,waitqueue) pair killed - we have fs-wide
exclusion between renames enforced by VFS, so hfs rename_{lock,wait}
can be removed.

fs/hfs/catalog.c
fs/hfs/hfs.h
fs/hfs/mdb.c

index 3bcdaae4e024e8daba829bbdead37d2830242559..a82753c462d91f51641aa169f39c1a45a1d58afb 100644 (file)
@@ -1346,13 +1346,6 @@ int hfs_cat_move(struct hfs_cat_entry *old_dir, struct hfs_cat_entry *new_dir,
                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) {
@@ -1567,11 +1560,6 @@ done:
                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;
 }
 
index e328a14aeed7657f8f32367cd5f0408625d47da0..b47023dce737368aa38df007d45ef1ee39e145d4 100644 (file)
@@ -271,8 +271,6 @@ struct hfs_mdb {
                                                   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;
index d907a632dad90fbdd8c1324170207178477e1420..df17c564df47811d73761556e2f98afa8acd06dc 100644 (file)
@@ -100,7 +100,6 @@ struct hfs_mdb *hfs_mdb_get(hfs_sysmdb sys_mdb, int readonly,
        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 */