summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/open.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/open.c b/fs/open.c
index 124ccb1..764cc9c 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;
OpenPOWER on IntegriCloud