diff options
Diffstat (limited to 'fs/exofs')
-rw-r--r-- | fs/exofs/dir.c | 6 | ||||
-rw-r--r-- | fs/exofs/inode.c | 4 | ||||
-rw-r--r-- | fs/exofs/namei.c | 14 |
3 files changed, 14 insertions, 10 deletions
diff --git a/fs/exofs/dir.c b/fs/exofs/dir.c index f69a1b5826a5..79101651fe9e 100644 --- a/fs/exofs/dir.c +++ b/fs/exofs/dir.c @@ -416,7 +416,7 @@ int exofs_set_link(struct inode *dir, struct exofs_dir_entry *de, if (likely(!err)) err = exofs_commit_chunk(page, pos, len); exofs_put_page(page); - dir->i_mtime = dir->i_ctime = CURRENT_TIME; + dir->i_mtime = dir->i_ctime = current_time(dir); mark_inode_dirty(dir); return err; } @@ -503,7 +503,7 @@ got_it: de->inode_no = cpu_to_le64(inode->i_ino); exofs_set_de_type(de, inode); err = exofs_commit_chunk(page, pos, rec_len); - dir->i_mtime = dir->i_ctime = CURRENT_TIME; + dir->i_mtime = dir->i_ctime = current_time(dir); mark_inode_dirty(dir); sbi->s_numfiles++; @@ -554,7 +554,7 @@ int exofs_delete_entry(struct exofs_dir_entry *dir, struct page *page) dir->inode_no = 0; if (likely(!err)) err = exofs_commit_chunk(page, pos, to - from); - inode->i_ctime = inode->i_mtime = CURRENT_TIME; + inode->i_ctime = inode->i_mtime = current_time(inode); mark_inode_dirty(inode); sbi->s_numfiles--; out: diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c index 5e68daee5fe4..d42ff527ab21 100644 --- a/fs/exofs/inode.c +++ b/fs/exofs/inode.c @@ -1007,7 +1007,7 @@ static int _do_truncate(struct inode *inode, loff_t newsize) struct exofs_sb_info *sbi = inode->i_sb->s_fs_info; int ret; - inode->i_mtime = inode->i_ctime = CURRENT_TIME; + inode->i_mtime = inode->i_ctime = current_time(inode); ret = ore_truncate(&sbi->layout, &oi->oc, (u64)newsize); if (likely(!ret)) @@ -1313,7 +1313,7 @@ struct inode *exofs_new_inode(struct inode *dir, umode_t mode) inode_init_owner(inode, dir, mode); inode->i_ino = sbi->s_nextid++; inode->i_blkbits = EXOFS_BLKSHIFT; - inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; + inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode); oi->i_commit_size = inode->i_size = 0; spin_lock(&sbi->s_next_gen_lock); inode->i_generation = sbi->s_next_generation++; diff --git a/fs/exofs/namei.c b/fs/exofs/namei.c index 622a686bb08b..7295cd722770 100644 --- a/fs/exofs/namei.c +++ b/fs/exofs/namei.c @@ -142,7 +142,7 @@ static int exofs_link(struct dentry *old_dentry, struct inode *dir, { struct inode *inode = d_inode(old_dentry); - inode->i_ctime = CURRENT_TIME; + inode->i_ctime = current_time(inode); inode_inc_link_count(inode); ihold(inode); @@ -227,7 +227,8 @@ static int exofs_rmdir(struct inode *dir, struct dentry *dentry) } static int exofs_rename(struct inode *old_dir, struct dentry *old_dentry, - struct inode *new_dir, struct dentry *new_dentry) + struct inode *new_dir, struct dentry *new_dentry, + unsigned int flags) { struct inode *old_inode = d_inode(old_dentry); struct inode *new_inode = d_inode(new_dentry); @@ -237,6 +238,9 @@ static int exofs_rename(struct inode *old_dir, struct dentry *old_dentry, struct exofs_dir_entry *old_de; int err = -ENOENT; + if (flags & ~RENAME_NOREPLACE) + return -EINVAL; + old_de = exofs_find_entry(old_dir, old_dentry, &old_page); if (!old_de) goto out; @@ -261,7 +265,7 @@ static int exofs_rename(struct inode *old_dir, struct dentry *old_dentry, if (!new_de) goto out_dir; err = exofs_set_link(new_dir, new_de, new_page, old_inode); - new_inode->i_ctime = CURRENT_TIME; + new_inode->i_ctime = current_time(new_inode); if (dir_de) drop_nlink(new_inode); inode_dec_link_count(new_inode); @@ -275,7 +279,7 @@ static int exofs_rename(struct inode *old_dir, struct dentry *old_dentry, inode_inc_link_count(new_dir); } - old_inode->i_ctime = CURRENT_TIME; + old_inode->i_ctime = current_time(old_inode); exofs_delete_entry(old_de, old_page); mark_inode_dirty(old_inode); @@ -310,7 +314,7 @@ const struct inode_operations exofs_dir_inode_operations = { .mkdir = exofs_mkdir, .rmdir = exofs_rmdir, .mknod = exofs_mknod, - .rename = exofs_rename, + .rename = exofs_rename, .setattr = exofs_setattr, }; |