Switch may_open() and break_lease() to passing O_...

... instead of mixing FMODE_ and O_

Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
Al Viro 2009-12-24 06:47:55 -05:00
commit 8737c9305b
8 changed files with 18 additions and 21 deletions

View file

@ -36,10 +36,9 @@ static struct file *do_open(char *name, int flags)
return ERR_PTR(error);
if (flags == O_RDWR)
error = may_open(&nd.path, MAY_READ|MAY_WRITE,
FMODE_READ|FMODE_WRITE);
error = may_open(&nd.path, MAY_READ|MAY_WRITE, flags);
else
error = may_open(&nd.path, MAY_WRITE, FMODE_WRITE);
error = may_open(&nd.path, MAY_WRITE, flags);
if (!error)
return dentry_open(nd.path.dentry, nd.path.mnt, flags,