[RFC] [PATCH] do_sys_truncate: call do_truncate with ATTR_MTIME|ATTR_CTIME
- From: "Vladimir V. Saveliev" <vs@xxxxxxxxxxx>
- Date: Fri, 30 Jun 2006 17:33:29 +0400
Hello
do_sys_ftruncate calls do_truncate with time_attrs set to ATTR_MTIME|
ATTR_CTIME. Is there a reason for do_sys_truncate to not set time_attrs
to the same value or it is a bug?
--- Begin Message ---From: Vladimir Saveliev <vs@xxxxxxxxxxx>
- From:
- Date: Fri, 30 Jun 2006 17:33:29 +0400
When do_truncate is called from do_sys_truncate it is not given
ATTR_MTIME|ATTR_CTIME as in case when it is called from
do_sys_ftruncate. The patch fixes this unfairness.
Signed-off-by: Vladimir Saveliev <vs@xxxxxxxxxxx>
diff -puN fs/open.c~do_truncate-time_attrs fs/open.c
--- linux-2.6.17-mm3/fs/open.c~do_truncate-time_attrs 2006-06-30 16:41:21.000000000 +0400
+++ linux-2.6.17-mm3-root/fs/open.c 2006-06-30 16:49:54.000000000 +0400
@@ -270,7 +270,7 @@ static long do_sys_truncate(const char _
error = locks_verify_truncate(inode, NULL, length);
if (!error) {
DQUOT_INIT(inode);
- error = do_truncate(nd.dentry, length, 0, NULL);
+ error = do_truncate(nd.dentry, length, ATTR_MTIME|ATTR_CTIME, NULL);
}
put_write_access(inode);
_
--- End Message ---
- Follow-Ups:
- Re: [RFC] [PATCH] do_sys_truncate: call do_truncate with ATTR_MTIME|ATTR_CTIME
- From: Trond Myklebust
- Re: [RFC] [PATCH] do_sys_truncate: call do_truncate with ATTR_MTIME|ATTR_CTIME
- Prev by Date: Re: [PATCH 10/17] 2.6.17.1 perfmon2 patch for review: PMU context switch
- Next by Date: Re: Measuring tools - top and interrupts
- Previous by thread: usb-storage device wrongly seen as "write protect is on"
- Next by thread: Re: [RFC] [PATCH] do_sys_truncate: call do_truncate with ATTR_MTIME|ATTR_CTIME
- Index(es):