diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-06-23 20:49:45 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-07-14 14:35:50 +0200 |
commit | c3c4f69424db0760239762d36d0b1b6ae524008b (patch) | |
tree | b8a6a5eb446d22604d362b7b718c2ff52c7812de | |
parent | mark_files_ro(): don't bother with mntget/mntput (diff) | |
download | linux-c3c4f69424db0760239762d36d0b1b6ae524008b.tar.xz linux-c3c4f69424db0760239762d36d0b1b6ae524008b.zip |
do_dentry_open(): close the race with mark_files_ro() in failure exit
we want to take it out of mark_files_ro() reach *before* we start
checking if we ought to drop write access.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/open.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/open.c b/fs/open.c index 124ccb1d38a0..764cc9c201a5 100644 --- a/fs/open.c +++ b/fs/open.c @@ -727,6 +727,7 @@ static int do_dentry_open(struct file *f, cleanup_all: fops_put(f->f_op); + file_sb_list_del(f); if (f->f_mode & FMODE_WRITE) { put_write_access(inode); if (!special_file(inode->i_mode)) { @@ -740,7 +741,6 @@ cleanup_all: mnt_drop_write(f->f_path.mnt); } } - file_sb_list_del(f); cleanup_file: path_put(&f->f_path); f->f_path.mnt = NULL; |