mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
gfs2_atomic_open(): fix O_EXCL|O_CREAT handling on cold dcache
commit 21039132650281de06a169cbe8a0f7e5c578fd8b upstream.
with the way fs/namei.c:do_last() had been done, ->atomic_open()
instances needed to recognize the case when existing file got
found with O_EXCL|O_CREAT, either by falling back to finish_no_open()
or failing themselves. gfs2 one didn't.
Fixes: 6d4ade986f (GFS2: Add atomic_open support)
Cc: [email protected] # v3.11
Signed-off-by: Al Viro <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
918ba24a9b
commit
9719442f9e
1 changed files with 1 additions and 1 deletions
|
|
@ -1248,7 +1248,7 @@ static int gfs2_atomic_open(struct inode *dir, struct dentry *dentry,
|
|||
if (!(file->f_mode & FMODE_OPENED))
|
||||
return finish_no_open(file, d);
|
||||
dput(d);
|
||||
return 0;
|
||||
return excl && (flags & O_CREAT) ? -EEXIST : 0;
|
||||
}
|
||||
|
||||
BUG_ON(d != NULL);
|
||||
|
|
|
|||
Loading…
Reference in a new issue