X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=fs%2Fexofs%2Fnamei.c;h=7295cd7227700ee9f4356f03805ba839dab551ce;hb=101105b1717f536ca741f940033996302d4ef191;hp=622a686bb08b5e3429a316f4e849f94f42fdb8db;hpb=fdb8a291227338fe54a2a790dae457726e5c237b;p=cascardo%2Flinux.git 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, };