Commit 04af400e authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] hfsplus: update dir time after change

From: Roman Zippel <zippel@linux-m68k.org>

Update dir ctime/mtime when adding/removing an entry.
parent d4f99544
...@@ -121,6 +121,7 @@ int hfs_cat_create(u32 cnid, struct inode *dir, struct qstr *str, struct inode * ...@@ -121,6 +121,7 @@ int hfs_cat_create(u32 cnid, struct inode *dir, struct qstr *str, struct inode *
goto err1; goto err1;
dir->i_size++; dir->i_size++;
dir->i_mtime = dir->i_ctime = CURRENT_TIME;
mark_inode_dirty(dir); mark_inode_dirty(dir);
hfs_find_exit(&fd); hfs_find_exit(&fd);
return 0; return 0;
...@@ -247,6 +248,7 @@ int hfs_cat_delete(u32 cnid, struct inode *dir, struct qstr *str) ...@@ -247,6 +248,7 @@ int hfs_cat_delete(u32 cnid, struct inode *dir, struct qstr *str)
} }
dir->i_size--; dir->i_size--;
dir->i_mtime = dir->i_ctime = CURRENT_TIME;
mark_inode_dirty(dir); mark_inode_dirty(dir);
res = 0; res = 0;
out: out:
...@@ -299,6 +301,7 @@ int hfs_cat_move(u32 cnid, struct inode *src_dir, struct qstr *src_name, ...@@ -299,6 +301,7 @@ int hfs_cat_move(u32 cnid, struct inode *src_dir, struct qstr *src_name,
if (err) if (err)
goto out; goto out;
dst_dir->i_size++; dst_dir->i_size++;
dst_dir->i_mtime = dst_dir->i_ctime = CURRENT_TIME;
mark_inode_dirty(dst_dir); mark_inode_dirty(dst_dir);
/* finally remove the old entry */ /* finally remove the old entry */
...@@ -310,6 +313,7 @@ int hfs_cat_move(u32 cnid, struct inode *src_dir, struct qstr *src_name, ...@@ -310,6 +313,7 @@ int hfs_cat_move(u32 cnid, struct inode *src_dir, struct qstr *src_name,
if (err) if (err)
goto out; goto out;
src_dir->i_size--; src_dir->i_size--;
src_dir->i_mtime = src_dir->i_ctime = CURRENT_TIME;
mark_inode_dirty(src_dir); mark_inode_dirty(src_dir);
type = entry.type; type = entry.type;
......
...@@ -185,6 +185,7 @@ int hfsplus_create_cat(u32 cnid, struct inode *dir, struct qstr *str, struct ino ...@@ -185,6 +185,7 @@ int hfsplus_create_cat(u32 cnid, struct inode *dir, struct qstr *str, struct ino
goto err1; goto err1;
dir->i_size++; dir->i_size++;
dir->i_mtime = dir->i_ctime = CURRENT_TIME;
mark_inode_dirty(dir); mark_inode_dirty(dir);
hfs_find_exit(&fd); hfs_find_exit(&fd);
return 0; return 0;
...@@ -266,6 +267,7 @@ int hfsplus_delete_cat(u32 cnid, struct inode *dir, struct qstr *str) ...@@ -266,6 +267,7 @@ int hfsplus_delete_cat(u32 cnid, struct inode *dir, struct qstr *str)
goto out; goto out;
dir->i_size--; dir->i_size--;
dir->i_mtime = dir->i_ctime = CURRENT_TIME;
mark_inode_dirty(dir); mark_inode_dirty(dir);
out: out:
hfs_find_exit(&fd); hfs_find_exit(&fd);
...@@ -311,6 +313,7 @@ int hfsplus_rename_cat(u32 cnid, ...@@ -311,6 +313,7 @@ int hfsplus_rename_cat(u32 cnid,
if (err) if (err)
goto out; goto out;
dst_dir->i_size++; dst_dir->i_size++;
dst_dir->i_mtime = dst_dir->i_ctime = CURRENT_TIME;
mark_inode_dirty(dst_dir); mark_inode_dirty(dst_dir);
/* finally remove the old entry */ /* finally remove the old entry */
...@@ -322,6 +325,7 @@ int hfsplus_rename_cat(u32 cnid, ...@@ -322,6 +325,7 @@ int hfsplus_rename_cat(u32 cnid,
if (err) if (err)
goto out; goto out;
src_dir->i_size--; src_dir->i_size--;
src_dir->i_mtime = src_dir->i_ctime = CURRENT_TIME;
mark_inode_dirty(src_dir); mark_inode_dirty(src_dir);
/* remove old thread entry */ /* remove old thread entry */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment