diff options
Diffstat (limited to 'fs/udf/namei.c')
-rw-r--r-- | fs/udf/namei.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/fs/udf/namei.c b/fs/udf/namei.c index c3e5c9679371..2d65e280748b 100644 --- a/fs/udf/namei.c +++ b/fs/udf/namei.c @@ -616,7 +616,7 @@ static int udf_add_nondir(struct dentry *dentry, struct inode *inode) *(__le32 *)((struct allocDescImpUse *)cfi.icb.impUse)->impUse = cpu_to_le32(iinfo->i_unique & 0x00000000FFFFFFFFUL); udf_write_fi(dir, &cfi, fi, &fibh, NULL, NULL); - dir->i_ctime = dir->i_mtime = current_fs_time(dir->i_sb); + dir->i_ctime = dir->i_mtime = current_time(dir); mark_inode_dirty(dir); if (fibh.sbh != fibh.ebh) brelse(fibh.ebh); @@ -730,7 +730,7 @@ static int udf_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) cfi.fileCharacteristics |= FID_FILE_CHAR_DIRECTORY; udf_write_fi(dir, &cfi, fi, &fibh, NULL, NULL); inc_nlink(dir); - dir->i_ctime = dir->i_mtime = current_fs_time(dir->i_sb); + dir->i_ctime = dir->i_mtime = current_time(dir); mark_inode_dirty(dir); unlock_new_inode(inode); d_instantiate(dentry, inode); @@ -845,7 +845,7 @@ static int udf_rmdir(struct inode *dir, struct dentry *dentry) inode->i_size = 0; inode_dec_link_count(dir); inode->i_ctime = dir->i_ctime = dir->i_mtime = - current_fs_time(dir->i_sb); + current_time(inode); mark_inode_dirty(dir); end_rmdir: @@ -888,7 +888,7 @@ static int udf_unlink(struct inode *dir, struct dentry *dentry) retval = udf_delete_entry(dir, fi, &fibh, &cfi); if (retval) goto end_unlink; - dir->i_ctime = dir->i_mtime = current_fs_time(dir->i_sb); + dir->i_ctime = dir->i_mtime = current_time(dir); mark_inode_dirty(dir); inode_dec_link_count(inode); inode->i_ctime = dir->i_ctime; @@ -1079,9 +1079,9 @@ static int udf_link(struct dentry *old_dentry, struct inode *dir, brelse(fibh.ebh); brelse(fibh.sbh); inc_nlink(inode); - inode->i_ctime = current_fs_time(inode->i_sb); + inode->i_ctime = current_time(inode); mark_inode_dirty(inode); - dir->i_ctime = dir->i_mtime = current_fs_time(dir->i_sb); + dir->i_ctime = dir->i_mtime = current_time(dir); mark_inode_dirty(dir); ihold(inode); d_instantiate(dentry, inode); @@ -1093,7 +1093,8 @@ static int udf_link(struct dentry *old_dentry, struct inode *dir, * higher-level routines. */ static int udf_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); @@ -1105,6 +1106,9 @@ static int udf_rename(struct inode *old_dir, struct dentry *old_dentry, struct kernel_lb_addr tloc; struct udf_inode_info *old_iinfo = UDF_I(old_inode); + if (flags & ~RENAME_NOREPLACE) + return -EINVAL; + ofi = udf_find_entry(old_dir, &old_dentry->d_name, &ofibh, &ocfi); if (IS_ERR(ofi)) { retval = PTR_ERR(ofi); @@ -1172,7 +1176,7 @@ static int udf_rename(struct inode *old_dir, struct dentry *old_dentry, * Like most other Unix systems, set the ctime for inodes on a * rename. */ - old_inode->i_ctime = current_fs_time(old_inode->i_sb); + old_inode->i_ctime = current_time(old_inode); mark_inode_dirty(old_inode); /* @@ -1188,11 +1192,11 @@ static int udf_rename(struct inode *old_dir, struct dentry *old_dentry, udf_delete_entry(old_dir, ofi, &ofibh, &ocfi); if (new_inode) { - new_inode->i_ctime = current_fs_time(new_inode->i_sb); + new_inode->i_ctime = current_time(new_inode); inode_dec_link_count(new_inode); } - old_dir->i_ctime = old_dir->i_mtime = current_fs_time(old_dir->i_sb); - new_dir->i_ctime = new_dir->i_mtime = current_fs_time(new_dir->i_sb); + old_dir->i_ctime = old_dir->i_mtime = current_time(old_dir); + new_dir->i_ctime = new_dir->i_mtime = current_time(new_dir); mark_inode_dirty(old_dir); mark_inode_dirty(new_dir); |