mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -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
|
|
@ -201,7 +201,7 @@ static int ocfs2_acl_set_mode(struct inode *inode, struct buffer_head *di_bh,
|
|||
}
|
||||
|
||||
inode->i_mode = new_mode;
|
||||
inode->i_ctime = CURRENT_TIME;
|
||||
inode->i_ctime = current_time(inode);
|
||||
di->i_mode = cpu_to_le16(inode->i_mode);
|
||||
di->i_ctime = cpu_to_le64(inode->i_ctime.tv_sec);
|
||||
di->i_ctime_nsec = cpu_to_le32(inode->i_ctime.tv_nsec);
|
||||
|
|
|
|||
|
|
@ -7293,7 +7293,7 @@ int ocfs2_truncate_inline(struct inode *inode, struct buffer_head *di_bh,
|
|||
}
|
||||
|
||||
inode->i_blocks = ocfs2_inode_sector_count(inode);
|
||||
inode->i_ctime = inode->i_mtime = CURRENT_TIME;
|
||||
inode->i_ctime = inode->i_mtime = current_time(inode);
|
||||
|
||||
di->i_ctime = di->i_mtime = cpu_to_le64(inode->i_ctime.tv_sec);
|
||||
di->i_ctime_nsec = di->i_mtime_nsec = cpu_to_le32(inode->i_ctime.tv_nsec);
|
||||
|
|
|
|||
|
|
@ -2030,7 +2030,7 @@ out_write_size:
|
|||
}
|
||||
inode->i_blocks = ocfs2_inode_sector_count(inode);
|
||||
di->i_size = cpu_to_le64((u64)i_size_read(inode));
|
||||
inode->i_mtime = inode->i_ctime = CURRENT_TIME;
|
||||
inode->i_mtime = inode->i_ctime = current_time(inode);
|
||||
di->i_mtime = di->i_ctime = cpu_to_le64(inode->i_mtime.tv_sec);
|
||||
di->i_mtime_nsec = di->i_ctime_nsec = cpu_to_le32(inode->i_mtime.tv_nsec);
|
||||
ocfs2_update_inode_fsync_trans(handle, inode, 1);
|
||||
|
|
|
|||
|
|
@ -1677,7 +1677,7 @@ int __ocfs2_add_entry(handle_t *handle,
|
|||
offset, ocfs2_dir_trailer_blk_off(dir->i_sb));
|
||||
|
||||
if (ocfs2_dirent_would_fit(de, rec_len)) {
|
||||
dir->i_mtime = dir->i_ctime = CURRENT_TIME;
|
||||
dir->i_mtime = dir->i_ctime = current_time(dir);
|
||||
retval = ocfs2_mark_inode_dirty(handle, dir, parent_fe_bh);
|
||||
if (retval < 0) {
|
||||
mlog_errno(retval);
|
||||
|
|
@ -2990,7 +2990,7 @@ static int ocfs2_expand_inline_dir(struct inode *dir, struct buffer_head *di_bh,
|
|||
ocfs2_dinode_new_extent_list(dir, di);
|
||||
|
||||
i_size_write(dir, sb->s_blocksize);
|
||||
dir->i_mtime = dir->i_ctime = CURRENT_TIME;
|
||||
dir->i_mtime = dir->i_ctime = current_time(dir);
|
||||
|
||||
di->i_size = cpu_to_le64(sb->s_blocksize);
|
||||
di->i_ctime = di->i_mtime = cpu_to_le64(dir->i_ctime.tv_sec);
|
||||
|
|
|
|||
|
|
@ -398,7 +398,7 @@ static struct inode *dlmfs_get_root_inode(struct super_block *sb)
|
|||
if (inode) {
|
||||
inode->i_ino = get_next_ino();
|
||||
inode_init_owner(inode, NULL, mode);
|
||||
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
|
||||
inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
|
||||
inc_nlink(inode);
|
||||
|
||||
inode->i_fop = &simple_dir_operations;
|
||||
|
|
@ -421,7 +421,7 @@ static struct inode *dlmfs_get_inode(struct inode *parent,
|
|||
|
||||
inode->i_ino = get_next_ino();
|
||||
inode_init_owner(inode, parent, mode);
|
||||
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
|
||||
inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
|
||||
|
||||
ip = DLMFS_I(inode);
|
||||
ip->ip_conn = DLMFS_I(parent)->ip_conn;
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ int ocfs2_should_update_atime(struct inode *inode,
|
|||
return 0;
|
||||
}
|
||||
|
||||
now = CURRENT_TIME;
|
||||
now = current_time(inode);
|
||||
if ((now.tv_sec - inode->i_atime.tv_sec <= osb->s_atime_quantum))
|
||||
return 0;
|
||||
else
|
||||
|
|
@ -287,7 +287,7 @@ int ocfs2_update_inode_atime(struct inode *inode,
|
|||
* have i_mutex to guard against concurrent changes to other
|
||||
* inode fields.
|
||||
*/
|
||||
inode->i_atime = CURRENT_TIME;
|
||||
inode->i_atime = current_time(inode);
|
||||
di->i_atime = cpu_to_le64(inode->i_atime.tv_sec);
|
||||
di->i_atime_nsec = cpu_to_le32(inode->i_atime.tv_nsec);
|
||||
ocfs2_update_inode_fsync_trans(handle, inode, 0);
|
||||
|
|
@ -308,7 +308,7 @@ int ocfs2_set_inode_size(handle_t *handle,
|
|||
|
||||
i_size_write(inode, new_i_size);
|
||||
inode->i_blocks = ocfs2_inode_sector_count(inode);
|
||||
inode->i_ctime = inode->i_mtime = CURRENT_TIME;
|
||||
inode->i_ctime = inode->i_mtime = current_time(inode);
|
||||
|
||||
status = ocfs2_mark_inode_dirty(handle, inode, fe_bh);
|
||||
if (status < 0) {
|
||||
|
|
@ -429,7 +429,7 @@ static int ocfs2_orphan_for_truncate(struct ocfs2_super *osb,
|
|||
}
|
||||
|
||||
i_size_write(inode, new_i_size);
|
||||
inode->i_ctime = inode->i_mtime = CURRENT_TIME;
|
||||
inode->i_ctime = inode->i_mtime = current_time(inode);
|
||||
|
||||
di = (struct ocfs2_dinode *) fe_bh->b_data;
|
||||
di->i_size = cpu_to_le64(new_i_size);
|
||||
|
|
@ -840,7 +840,7 @@ static int ocfs2_write_zero_page(struct inode *inode, u64 abs_from,
|
|||
i_size_write(inode, abs_to);
|
||||
inode->i_blocks = ocfs2_inode_sector_count(inode);
|
||||
di->i_size = cpu_to_le64((u64)i_size_read(inode));
|
||||
inode->i_mtime = inode->i_ctime = CURRENT_TIME;
|
||||
inode->i_mtime = inode->i_ctime = current_time(inode);
|
||||
di->i_mtime = di->i_ctime = cpu_to_le64(inode->i_mtime.tv_sec);
|
||||
di->i_ctime_nsec = cpu_to_le32(inode->i_mtime.tv_nsec);
|
||||
di->i_mtime_nsec = di->i_ctime_nsec;
|
||||
|
|
@ -1950,7 +1950,7 @@ static int __ocfs2_change_file_space(struct file *file, struct inode *inode,
|
|||
if (change_size && i_size_read(inode) < size)
|
||||
i_size_write(inode, size);
|
||||
|
||||
inode->i_ctime = inode->i_mtime = CURRENT_TIME;
|
||||
inode->i_ctime = inode->i_mtime = current_time(inode);
|
||||
ret = ocfs2_mark_inode_dirty(handle, inode, di_bh);
|
||||
if (ret < 0)
|
||||
mlog_errno(ret);
|
||||
|
|
|
|||
|
|
@ -953,7 +953,7 @@ static int ocfs2_move_extents(struct ocfs2_move_extents_context *context)
|
|||
}
|
||||
|
||||
di = (struct ocfs2_dinode *)di_bh->b_data;
|
||||
inode->i_ctime = CURRENT_TIME;
|
||||
inode->i_ctime = current_time(inode);
|
||||
di->i_ctime = cpu_to_le64(inode->i_ctime.tv_sec);
|
||||
di->i_ctime_nsec = cpu_to_le32(inode->i_ctime.tv_nsec);
|
||||
ocfs2_update_inode_fsync_trans(handle, inode, 0);
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -3778,7 +3778,7 @@ static int ocfs2_change_ctime(struct inode *inode,
|
|||
goto out_commit;
|
||||
}
|
||||
|
||||
inode->i_ctime = CURRENT_TIME;
|
||||
inode->i_ctime = current_time(inode);
|
||||
di->i_ctime = cpu_to_le64(inode->i_ctime.tv_sec);
|
||||
di->i_ctime_nsec = cpu_to_le32(inode->i_ctime.tv_nsec);
|
||||
|
||||
|
|
@ -4094,7 +4094,7 @@ static int ocfs2_complete_reflink(struct inode *s_inode,
|
|||
* we want mtime to appear identical to the source and
|
||||
* update ctime.
|
||||
*/
|
||||
t_inode->i_ctime = CURRENT_TIME;
|
||||
t_inode->i_ctime = current_time(t_inode);
|
||||
|
||||
di->i_ctime = cpu_to_le64(t_inode->i_ctime.tv_sec);
|
||||
di->i_ctime_nsec = cpu_to_le32(t_inode->i_ctime.tv_nsec);
|
||||
|
|
|
|||
|
|
@ -3431,7 +3431,7 @@ static int __ocfs2_xattr_set_handle(struct inode *inode,
|
|||
goto out;
|
||||
}
|
||||
|
||||
inode->i_ctime = CURRENT_TIME;
|
||||
inode->i_ctime = current_time(inode);
|
||||
di->i_ctime = cpu_to_le64(inode->i_ctime.tv_sec);
|
||||
di->i_ctime_nsec = cpu_to_le32(inode->i_ctime.tv_nsec);
|
||||
ocfs2_journal_dirty(ctxt->handle, xis->inode_bh);
|
||||
|
|
|
|||
Loading…
Reference in a new issue