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:
@@ -675,7 +675,7 @@ static struct file *__dentry_open(struct dentry *dentry, struct vfsmount *mnt,
|
||||
f->f_path.mnt = mnt;
|
||||
f->f_pos = 0;
|
||||
f->f_op = fops_get(inode->i_fop);
|
||||
file_move(f, &inode->i_sb->s_files);
|
||||
file_sb_list_add(f, inode->i_sb);
|
||||
|
||||
error = security_dentry_open(f, cred);
|
||||
if (error)
|
||||
@@ -721,7 +721,7 @@ cleanup_all:
|
||||
mnt_drop_write(mnt);
|
||||
}
|
||||
}
|
||||
file_kill(f);
|
||||
file_sb_list_del(f);
|
||||
f->f_path.dentry = NULL;
|
||||
f->f_path.mnt = NULL;
|
||||
cleanup_file:
|
||||
|
Reference in New Issue
Block a user