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

... instead of mixing FMODE_ and O_

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro
2009-12-24 06:47:55 -05:00
parent d208bbdda9
commit 8737c9305b
8 changed files with 18 additions and 21 deletions

View File

@@ -271,7 +271,7 @@ static long do_sys_truncate(const char __user *pathname, loff_t length)
* Make sure that there are no leases. get_write_access() protects
* against the truncate racing with a lease-granting setlease().
*/
error = break_lease(inode, FMODE_WRITE);
error = break_lease(inode, O_WRONLY);
if (error)
goto put_write_and_out;