From: Viacheslav Dubeyko <slava@dubeyko.com>
To: "Ernesto A. Fernández" <ernesto.mnd.fernandez@gmail.com>
Cc: linux-fsdevel@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 1/2] hfsplus: update timestamps on truncate()
Date: Fri, 12 Oct 2018 14:57:21 -0700 [thread overview]
Message-ID: <1539381441.3203.6.camel@slavad-ubuntu-14.04> (raw)
In-Reply-To: <9beb0913eea37288599e8e1b7cec8768fb52d1b8.1539316825.git.ernesto.mnd.fernandez@gmail.com>
On Fri, 2018-10-12 at 01:22 -0300, Ernesto A. Fernández wrote:
> The vfs takes care of updating ctime and mtime on ftruncate(), but on
> truncate() it must be done by the module.
>
> This patch can be tested with xfstests generic/313.
>
> Signed-off-by: Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
> ---
> fs/hfsplus/inode.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c
> index 8e9427a42b81..d7ab9d8c4b67 100644
> --- a/fs/hfsplus/inode.c
> +++ b/fs/hfsplus/inode.c
> @@ -261,6 +261,7 @@ static int hfsplus_setattr(struct dentry *dentry, struct iattr *attr)
> }
> truncate_setsize(inode, attr->ia_size);
> hfsplus_file_truncate(inode);
> + inode->i_mtime = inode->i_ctime = current_time(inode);
> }
>
> setattr_copy(inode, attr);
Looks good.
Reviewed-by: Vyacheslav Dubeyko <slava@dubeyko.com>
Thanks,
Vyacheslav Dubeyko.
next prev parent reply other threads:[~2018-10-13 5:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-12 4:22 [PATCH 1/2] hfsplus: update timestamps on truncate() Ernesto A. Fernández
2018-10-12 4:23 ` [PATCH 2/2] hfs: update timestamp " Ernesto A. Fernández
2018-10-12 21:57 ` Viacheslav Dubeyko
2018-10-12 21:57 ` Viacheslav Dubeyko [this message]
2018-10-13 2:42 ` [PATCH 1/2] hfsplus: update timestamps " Al Viro
2018-10-15 21:02 ` Viacheslav Dubeyko
2018-10-15 21:24 ` Al Viro
2018-10-17 2:01 ` Viacheslav Dubeyko
2018-10-18 2:09 ` Viacheslav Dubeyko
2018-10-16 23:15 ` Ernesto A. Fernández
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=1539381441.3203.6.camel@slavad-ubuntu-14.04 \
--to=slava@dubeyko.com \
--cc=akpm@linux-foundation.org \
--cc=ernesto.mnd.fernandez@gmail.com \
--cc=linux-fsdevel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.