]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/exec.c
fs: fs_struct rwlock to spinlock
[net-next-2.6.git] / fs / exec.c
index 7761837e4500f0c3fee3c3dd51427dcd6adef82a..5adab2c93ecaa621525892b607c9a291ce6bbe80 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1117,7 +1117,7 @@ int check_unsafe_exec(struct linux_binprm *bprm)
        bprm->unsafe = tracehook_unsafe_exec(p);
 
        n_fs = 1;
-       write_lock(&p->fs->lock);
+       spin_lock(&p->fs->lock);
        rcu_read_lock();
        for (t = next_thread(p); t != p; t = next_thread(t)) {
                if (t->fs == p->fs)
@@ -1134,7 +1134,7 @@ int check_unsafe_exec(struct linux_binprm *bprm)
                        res = 1;
                }
        }
-       write_unlock(&p->fs->lock);
+       spin_unlock(&p->fs->lock);
 
        return res;
 }