]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/open.c
Switch may_open() and break_lease() to passing O_...
[net-next-2.6.git] / fs / open.c
index 040cef72bc00e46a0c58790f1c18cef7722756c8..e0b2d88b03800863f367b67096aa093a3f70ea11 100644 (file)
--- a/fs/open.c
+++ b/fs/open.c
@@ -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;