mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull more vfs updates from Al Viro: ">rename2() work from Miklos + current_time() from Deepa" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fs: Replace current_fs_time() with current_time() fs: Replace CURRENT_TIME_SEC with current_time() for inode timestamps fs: Replace CURRENT_TIME with current_time() for inode timestamps fs: proc: Delete inode time initializations in proc_alloc_inode() vfs: Add current_time() api vfs: add note about i_op->rename changes to porting fs: rename "rename2" i_op to "rename" vfs: remove unused i_op->rename fs: make remaining filesystems use .rename2 libfs: support RENAME_NOREPLACE in simple_rename() fs: support RENAME_NOREPLACE for local filesystems ncpfs: fix unused variable warning
This commit is contained in:
commit
101105b171
182 changed files with 587 additions and 449 deletions
|
|
@ -303,7 +303,7 @@ int hfsplus_create_cat(u32 cnid, struct inode *dir,
|
|||
dir->i_size++;
|
||||
if (S_ISDIR(inode->i_mode))
|
||||
hfsplus_subfolders_inc(dir);
|
||||
dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
|
||||
dir->i_mtime = dir->i_ctime = current_time(dir);
|
||||
hfsplus_mark_inode_dirty(dir, HFSPLUS_I_CAT_DIRTY);
|
||||
|
||||
hfs_find_exit(&fd);
|
||||
|
|
@ -400,7 +400,7 @@ int hfsplus_delete_cat(u32 cnid, struct inode *dir, const struct qstr *str)
|
|||
dir->i_size--;
|
||||
if (type == HFSPLUS_FOLDER)
|
||||
hfsplus_subfolders_dec(dir);
|
||||
dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
|
||||
dir->i_mtime = dir->i_ctime = current_time(dir);
|
||||
hfsplus_mark_inode_dirty(dir, HFSPLUS_I_CAT_DIRTY);
|
||||
|
||||
if (type == HFSPLUS_FILE || type == HFSPLUS_FOLDER) {
|
||||
|
|
@ -469,7 +469,7 @@ int hfsplus_rename_cat(u32 cnid,
|
|||
dst_dir->i_size++;
|
||||
if (type == HFSPLUS_FOLDER)
|
||||
hfsplus_subfolders_inc(dst_dir);
|
||||
dst_dir->i_mtime = dst_dir->i_ctime = CURRENT_TIME_SEC;
|
||||
dst_dir->i_mtime = dst_dir->i_ctime = current_time(dst_dir);
|
||||
|
||||
/* finally remove the old entry */
|
||||
err = hfsplus_cat_build_key(sb, src_fd.search_key,
|
||||
|
|
@ -486,7 +486,7 @@ int hfsplus_rename_cat(u32 cnid,
|
|||
src_dir->i_size--;
|
||||
if (type == HFSPLUS_FOLDER)
|
||||
hfsplus_subfolders_dec(src_dir);
|
||||
src_dir->i_mtime = src_dir->i_ctime = CURRENT_TIME_SEC;
|
||||
src_dir->i_mtime = src_dir->i_ctime = current_time(src_dir);
|
||||
|
||||
/* remove old thread entry */
|
||||
hfsplus_cat_build_key_with_cnid(sb, src_fd.search_key, cnid);
|
||||
|
|
|
|||
|
|
@ -347,7 +347,7 @@ static int hfsplus_link(struct dentry *src_dentry, struct inode *dst_dir,
|
|||
inc_nlink(inode);
|
||||
hfsplus_instantiate(dst_dentry, inode, cnid);
|
||||
ihold(inode);
|
||||
inode->i_ctime = CURRENT_TIME_SEC;
|
||||
inode->i_ctime = current_time(inode);
|
||||
mark_inode_dirty(inode);
|
||||
sbi->file_count++;
|
||||
hfsplus_mark_mdb_dirty(dst_dir->i_sb);
|
||||
|
|
@ -406,7 +406,7 @@ static int hfsplus_unlink(struct inode *dir, struct dentry *dentry)
|
|||
hfsplus_delete_inode(inode);
|
||||
} else
|
||||
sbi->file_count--;
|
||||
inode->i_ctime = CURRENT_TIME_SEC;
|
||||
inode->i_ctime = current_time(inode);
|
||||
mark_inode_dirty(inode);
|
||||
out:
|
||||
mutex_unlock(&sbi->vh_mutex);
|
||||
|
|
@ -427,7 +427,7 @@ static int hfsplus_rmdir(struct inode *dir, struct dentry *dentry)
|
|||
if (res)
|
||||
goto out;
|
||||
clear_nlink(inode);
|
||||
inode->i_ctime = CURRENT_TIME_SEC;
|
||||
inode->i_ctime = current_time(inode);
|
||||
hfsplus_delete_inode(inode);
|
||||
mark_inode_dirty(inode);
|
||||
out:
|
||||
|
|
@ -530,10 +530,14 @@ static int hfsplus_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
|
|||
}
|
||||
|
||||
static int hfsplus_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)
|
||||
{
|
||||
int res;
|
||||
|
||||
if (flags & ~RENAME_NOREPLACE)
|
||||
return -EINVAL;
|
||||
|
||||
/* Unlink destination if it already exists */
|
||||
if (d_really_is_positive(new_dentry)) {
|
||||
if (d_is_dir(new_dentry))
|
||||
|
|
|
|||
|
|
@ -366,7 +366,7 @@ struct inode *hfsplus_new_inode(struct super_block *sb, umode_t mode)
|
|||
inode->i_uid = current_fsuid();
|
||||
inode->i_gid = current_fsgid();
|
||||
set_nlink(inode, 1);
|
||||
inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
|
||||
inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
|
||||
|
||||
hip = HFSPLUS_I(inode);
|
||||
INIT_LIST_HEAD(&hip->open_dir_list);
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ static int hfsplus_ioctl_setflags(struct file *file, int __user *user_flags)
|
|||
else
|
||||
hip->userflags &= ~HFSPLUS_FLG_NODUMP;
|
||||
|
||||
inode->i_ctime = CURRENT_TIME_SEC;
|
||||
inode->i_ctime = current_time(inode);
|
||||
mark_inode_dirty(inode);
|
||||
|
||||
out_unlock_inode:
|
||||
|
|
|
|||
Loading…
Reference in a new issue