->atomic_open(): return 0 in all success cases

FMODE_OPENED can be used to distingusish "successful open" from the
"called finish_no_open(), do it yourself" cases.  Since finish_no_open()
has been adjusted, no changes in the instances were actually needed.
The caller has been adjusted.

Acked-by: Linus Torvalds <[email protected]>
Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
Al Viro 2018-07-09 19:17:52 -04:00
commit 64e1ac4d46
2 changed files with 17 additions and 17 deletions

View file

@ -863,13 +863,13 @@ EXPORT_SYMBOL(finish_open);
* NB: unlike finish_open() this function does consume the dentry reference and
* the caller need not dput() it.
*
* Returns "1" which must be the return value of ->atomic_open() after having
* Returns "0" which must be the return value of ->atomic_open() after having
* called this function.
*/
int finish_no_open(struct file *file, struct dentry *dentry)
{
file->f_path.dentry = dentry;
return 1;
return 0;
}
EXPORT_SYMBOL(finish_no_open);