You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
fs: cleanup files_lock locking
fs: cleanup files_lock locking Lock tty_files with a new spinlock, tty_files_lock; provide helpers to manipulate the per-sb files list; unexport the files_lock spinlock. Cc: linux-kernel@vger.kernel.org Cc: Christoph Hellwig <hch@infradead.org> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Acked-by: Andi Kleen <ak@linux.intel.com> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Nick Piggin <npiggin@kernel.dk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user