]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - security/selinux/hooks.c
fs: cleanup files_lock locking
[net-next-2.6.git] / security / selinux / hooks.c
index 42043f96e54f69d0d2cb2ab1f063a7e638d0786f..bd7da0f0ccf3f58a72784c1ed0e2042eb8cd1b38 100644 (file)
@@ -2170,7 +2170,7 @@ static inline void flush_unauthorized_files(const struct cred *cred,
 
        tty = get_current_tty();
        if (tty) {
-               file_list_lock();
+               spin_lock(&tty_files_lock);
                if (!list_empty(&tty->tty_files)) {
                        struct inode *inode;
 
@@ -2186,7 +2186,7 @@ static inline void flush_unauthorized_files(const struct cred *cred,
                                drop_tty = 1;
                        }
                }
-               file_list_unlock();
+               spin_unlock(&tty_files_lock);
                tty_kref_put(tty);
        }
        /* Reset controlling tty. */