X-Git-Url: https://bbs.cooldavid.org/git/?a=blobdiff_plain;f=fs%2Fopen.c;fp=fs%2Fopen.c;h=e0b2d88b03800863f367b67096aa093a3f70ea11;hb=8737c9305bd5602b11f7eb4655d5695d4a42a0c6;hp=040cef72bc00e46a0c58790f1c18cef7722756c8;hpb=d208bbdda991b8808d9c033ce4d31cb1bd87dcfc;p=net-next-2.6.git diff --git a/fs/open.c b/fs/open.c index 040cef72bc0..e0b2d88b038 100644 --- 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;