mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
switch all remaining checks for FILE_OPENED to FMODE_OPENED
... and don't bother with setting FILE_OPENED at all. Acked-by: Linus Torvalds <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
69527c554f
commit
aad888f828
3 changed files with 5 additions and 13 deletions
|
|
@ -846,15 +846,10 @@ int finish_open(struct file *file, struct dentry *dentry,
|
|||
int (*open)(struct inode *, struct file *),
|
||||
int *opened)
|
||||
{
|
||||
int error;
|
||||
BUG_ON(*opened & FILE_OPENED); /* once it's opened, it's opened */
|
||||
BUG_ON(file->f_mode & FMODE_OPENED); /* once it's opened, it's opened */
|
||||
|
||||
file->f_path.dentry = dentry;
|
||||
error = do_dentry_open(file, d_backing_inode(dentry), open);
|
||||
if (!error)
|
||||
*opened |= FILE_OPENED;
|
||||
|
||||
return error;
|
||||
return do_dentry_open(file, d_backing_inode(dentry), open);
|
||||
}
|
||||
EXPORT_SYMBOL(finish_open);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue