X-Git-Url: http://git.cascardo.info/?p=cascardo%2Flinux.git;a=blobdiff_plain;f=fs%2Focfs2%2Fnamei.c;h=8d887c75765cf3169040d9b24068e6491cf365a7;hp=6cc043ebb9faaa0ba46352df27ee01d7e8116d51;hb=101105b1717f536ca741f940033996302d4ef191;hpb=35ff96dfd3c9aaa921b3e8dcac76b7697f2dcec0 diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index 6cc043ebb9fa..8d887c75765c 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c @@ -798,7 +798,7 @@ static int ocfs2_link(struct dentry *old_dentry, } inc_nlink(inode); - inode->i_ctime = CURRENT_TIME; + inode->i_ctime = current_time(inode); ocfs2_set_links_count(fe, inode->i_nlink); fe->i_ctime = cpu_to_le64(inode->i_ctime.tv_sec); fe->i_ctime_nsec = cpu_to_le32(inode->i_ctime.tv_nsec); @@ -1000,7 +1000,7 @@ static int ocfs2_unlink(struct inode *dir, ocfs2_set_links_count(fe, inode->i_nlink); ocfs2_journal_dirty(handle, fe_bh); - dir->i_ctime = dir->i_mtime = CURRENT_TIME; + dir->i_ctime = dir->i_mtime = current_time(dir); if (S_ISDIR(inode->i_mode)) drop_nlink(dir); @@ -1203,7 +1203,8 @@ static void ocfs2_double_unlock(struct inode *inode1, struct inode *inode2) static int ocfs2_rename(struct inode *old_dir, struct dentry *old_dentry, struct inode *new_dir, - struct dentry *new_dentry) + struct dentry *new_dentry, + unsigned int flags) { int status = 0, rename_lock = 0, parents_locked = 0, target_exists = 0; int old_child_locked = 0, new_child_locked = 0, update_dot_dot = 0; @@ -1228,6 +1229,9 @@ static int ocfs2_rename(struct inode *old_dir, struct ocfs2_dir_lookup_result target_insert = { NULL, }; bool should_add_orphan = false; + if (flags) + return -EINVAL; + /* At some point it might be nice to break this function up a * bit. */ @@ -1537,7 +1541,7 @@ static int ocfs2_rename(struct inode *old_dir, new_dir_bh, &target_insert); } - old_inode->i_ctime = CURRENT_TIME; + old_inode->i_ctime = current_time(old_inode); mark_inode_dirty(old_inode); status = ocfs2_journal_access_di(handle, INODE_CACHE(old_inode), @@ -1586,9 +1590,9 @@ static int ocfs2_rename(struct inode *old_dir, if (new_inode) { drop_nlink(new_inode); - new_inode->i_ctime = CURRENT_TIME; + new_inode->i_ctime = current_time(new_inode); } - old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME; + old_dir->i_ctime = old_dir->i_mtime = current_time(old_dir); if (update_dot_dot) { status = ocfs2_update_entry(old_inode, handle,