mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
pass a struct path * to may_open
No need for the nameidata in may_open - a struct path is enough. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
b4091d5f6f
commit
3fb64190aa
3 changed files with 11 additions and 10 deletions
|
|
@ -38,9 +38,10 @@ static struct file *do_open(char *name, int flags)
|
|||
return ERR_PTR(error);
|
||||
|
||||
if (flags == O_RDWR)
|
||||
error = may_open(&nd,MAY_READ|MAY_WRITE,FMODE_READ|FMODE_WRITE);
|
||||
error = may_open(&nd.path, MAY_READ|MAY_WRITE,
|
||||
FMODE_READ|FMODE_WRITE);
|
||||
else
|
||||
error = may_open(&nd, MAY_WRITE, FMODE_WRITE);
|
||||
error = may_open(&nd.path, MAY_WRITE, FMODE_WRITE);
|
||||
|
||||
if (!error)
|
||||
return dentry_open(nd.path.dentry, nd.path.mnt, flags,
|
||||
|
|
|
|||
Loading…
Reference in a new issue