From: Namjae Jeon <linkinjeon@gmail.com>
To: hirofumi@mail.parknet.co.jp, akpm@linux-foundation.org
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Namjae Jeon <linkinjeon@gmail.com>,
Amit Sahrawat <amit.sahrawat83@gmail.com>
Subject: [PATCH 2/3] fat: fix time updates for create and delete
Date: Sun, 11 Nov 2012 22:57:58 +0900 [thread overview]
Message-ID: <1352642278-2730-1-git-send-email-linkinjeon@gmail.com> (raw)
Correctly update modification and status change time in case of
file/directory removal and creation.
Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
Signed-off-by: Amit Sahrawat <amit.sahrawat83@gmail.com>
---
fs/fat/dir.c | 2 +-
fs/fat/namei_vfat.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/fat/dir.c b/fs/fat/dir.c
index 2a18234..c9fca7d 100644
--- a/fs/fat/dir.c
+++ b/fs/fat/dir.c
@@ -1042,7 +1042,7 @@ int fat_remove_entries(struct inode *dir, struct fat_slot_info *sinfo)
}
}
- dir->i_mtime = dir->i_atime = CURRENT_TIME_SEC;
+ dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
if (IS_DIRSYNC(dir))
(void)fat_sync_inode(dir);
else
diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c
index ac959d6..23bec0d 100644
--- a/fs/fat/namei_vfat.c
+++ b/fs/fat/namei_vfat.c
@@ -684,7 +684,7 @@ static int vfat_add_entry(struct inode *dir, struct qstr *qname, int is_dir,
goto cleanup;
/* update timestamp */
- dir->i_ctime = dir->i_mtime = dir->i_atime = *ts;
+ dir->i_ctime = dir->i_mtime = *ts;
if (IS_DIRSYNC(dir))
(void)fat_sync_inode(dir);
else
@@ -826,7 +826,7 @@ static int vfat_rmdir(struct inode *dir, struct dentry *dentry)
drop_nlink(dir);
clear_nlink(inode);
- inode->i_mtime = inode->i_atime = CURRENT_TIME_SEC;
+ inode->i_ctime = CURRENT_TIME_SEC;
fat_detach(inode);
out:
mutex_unlock(&MSDOS_SB(sb)->s_lock);
@@ -851,7 +851,7 @@ static int vfat_unlink(struct inode *dir, struct dentry *dentry)
if (err)
goto out;
clear_nlink(inode);
- inode->i_mtime = inode->i_atime = CURRENT_TIME_SEC;
+ inode->i_ctime = CURRENT_TIME_SEC;
fat_detach(inode);
out:
mutex_unlock(&MSDOS_SB(sb)->s_lock);
--
1.7.9.5
next reply other threads:[~2012-11-11 13:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-11 13:57 Namjae Jeon [this message]
2012-11-11 16:09 ` [PATCH 2/3] fat: fix time updates for create and delete OGAWA Hirofumi
2012-11-12 6:37 ` Namjae Jeon
2012-11-12 7:57 ` OGAWA Hirofumi
2012-11-12 7:58 ` OGAWA Hirofumi
2012-11-12 9:12 ` Namjae Jeon
2012-11-12 9:21 ` OGAWA Hirofumi
2012-11-12 9:22 ` OGAWA Hirofumi
2012-11-15 7:02 ` Namjae Jeon
2012-11-15 7:18 ` OGAWA Hirofumi
2012-11-16 10:12 ` Namjae Jeon
2012-11-16 13:47 ` OGAWA Hirofumi
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=1352642278-2730-1-git-send-email-linkinjeon@gmail.com \
--to=linkinjeon@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=amit.sahrawat83@gmail.com \
--cc=hirofumi@mail.parknet.co.jp \
--cc=linux-fsdevel@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).