mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Vladimir V. Saveliev" <vs@namesys.com>
To: lkml <Linux-Kernel@vger.kernel.org>
Subject: [RFC] [PATCH] do_sys_truncate: call do_truncate with ATTR_MTIME|ATTR_CTIME
Date: Fri, 30 Jun 2006 17:33:29 +0400	[thread overview]
Message-ID: <1151674409.6499.52.camel@tribesman.namesys.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 186 bytes --]

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?




[-- Attachment #2: do_truncate-time_attrs.patch --]
[-- Type: message/rfc822, Size: 972 bytes --]

From: 
Subject: No Subject
Date: Fri, 30 Jun 2006 17:33:29 +0400
Message-ID: <1151674409.6499.53.camel@tribesman.namesys.com>

From: Vladimir Saveliev <vs@namesys.com>

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@namesys.com>



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);
 

_

             reply	other threads:[~2006-06-30 13:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-30 13:33 Vladimir V. Saveliev [this message]
2006-06-30 13:59 ` Trond Myklebust

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1151674409.6499.52.camel@tribesman.namesys.com \
    --to=vs@namesys.com \
    --cc=Linux-Kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome