Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932442AbbHKTku (ORCPT ); Tue, 11 Aug 2015 15:40:50 -0400 Received: from 78-80-28-91.tmcz.cz ([78.80.28.91]:35822 "EHLO leontynka.twibright.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751944AbbHKTkt (ORCPT ); Tue, 11 Aug 2015 15:40:49 -0400 Date: Tue, 11 Aug 2015 21:40:40 +0200 (CEST) From: Mikulas Patocka X-X-Sender: mikulas@leontynka To: Taesoo Kim cc: linux-kernel@vger.kernel.org, taesoo@gatech.edu, changwoo@gatech.edu, sanidhya@gatech.edu, blee@gatech.edu, csong84@gatech.edu Subject: Re: [PATCH 1/1] hpfs: update ctime/mtime of old/new_dir In-Reply-To: <1427232308-22550-1-git-send-email-tsgatesv@gmail.com> Message-ID: References: <1427232308-22550-1-git-send-email-tsgatesv@gmail.com> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1592 Lines: 47 On Tue, 24 Mar 2015, Taesoo Kim wrote: > Upon successful rename(), update ctime and mtime of > old/new_dir, as posix specifies. > > Signed-off-by: Taesoo Kim > --- > fs/hpfs/namei.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/fs/hpfs/namei.c b/fs/hpfs/namei.c > index bdbc2c3..8d8669c 100644 > --- a/fs/hpfs/namei.c > +++ b/fs/hpfs/namei.c > @@ -600,6 +600,12 @@ static int hpfs_rename(struct inode *old_dir, struct dentry *old_dentry, > if (S_ISDIR(i->i_mode)) { > inc_nlink(new_dir); > drop_nlink(old_dir); > + > + old_dir->i_ctime.tv_sec = old_dir->i_mtime.tv_sec = local_to_gmt(old_dir->i_sb, get_seconds()); > + old_dir->i_ctime.tv_nsec = old_dir->i_mtime.tv_nsec = 0; > + > + new_dir->i_ctime.tv_sec = new_dir->i_mtime.tv_sec = local_to_gmt(new_dir->i_sb, get_seconds()); > + new_dir->i_ctime.tv_nsec = new_dir->i_mtime.tv_nsec = 0; > } > if ((fnode = hpfs_map_fnode(i->i_sb, i->i_ino, &bh))) { > fnode->up = cpu_to_le32(new_dir->i_ino); > -- > 2.3.3 Hi The patch is buggy - it only changes time in memory and never saves it to the disk, it doesn't change time when we rename non-directory entry. It also doesn't change time on other directory modifications - creating or deleting files. I will send a correct patch at the beginning of the next merge window. Mikuklas -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/