mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -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
|
|
@ -193,7 +193,7 @@ ext2_set_acl(struct inode *inode, struct posix_acl *acl, int type)
|
|||
error = posix_acl_update_mode(inode, &inode->i_mode, &acl);
|
||||
if (error)
|
||||
return error;
|
||||
inode->i_ctime = CURRENT_TIME_SEC;
|
||||
inode->i_ctime = current_time(inode);
|
||||
mark_inode_dirty(inode);
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -471,7 +471,7 @@ void ext2_set_link(struct inode *dir, struct ext2_dir_entry_2 *de,
|
|||
err = ext2_commit_chunk(page, pos, len);
|
||||
ext2_put_page(page);
|
||||
if (update_times)
|
||||
dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
|
||||
dir->i_mtime = dir->i_ctime = current_time(dir);
|
||||
EXT2_I(dir)->i_flags &= ~EXT2_BTREE_FL;
|
||||
mark_inode_dirty(dir);
|
||||
}
|
||||
|
|
@ -561,7 +561,7 @@ got_it:
|
|||
de->inode = cpu_to_le32(inode->i_ino);
|
||||
ext2_set_de_type (de, inode);
|
||||
err = ext2_commit_chunk(page, pos, rec_len);
|
||||
dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
|
||||
dir->i_mtime = dir->i_ctime = current_time(dir);
|
||||
EXT2_I(dir)->i_flags &= ~EXT2_BTREE_FL;
|
||||
mark_inode_dirty(dir);
|
||||
/* OFFSET_CACHE */
|
||||
|
|
@ -610,7 +610,7 @@ int ext2_delete_entry (struct ext2_dir_entry_2 * dir, struct page * page )
|
|||
pde->rec_len = ext2_rec_len_to_disk(to - from);
|
||||
dir->inode = 0;
|
||||
err = ext2_commit_chunk(page, pos, to - from);
|
||||
inode->i_ctime = inode->i_mtime = CURRENT_TIME_SEC;
|
||||
inode->i_ctime = inode->i_mtime = current_time(inode);
|
||||
EXT2_I(inode)->i_flags &= ~EXT2_BTREE_FL;
|
||||
mark_inode_dirty(inode);
|
||||
out:
|
||||
|
|
|
|||
|
|
@ -556,7 +556,7 @@ got:
|
|||
|
||||
inode->i_ino = ino;
|
||||
inode->i_blocks = 0;
|
||||
inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
|
||||
inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
|
||||
memset(ei->i_data, 0, sizeof(ei->i_data));
|
||||
ei->i_flags =
|
||||
ext2_mask_flags(mode, EXT2_I(dir)->i_flags & EXT2_FL_INHERITED);
|
||||
|
|
|
|||
|
|
@ -595,7 +595,7 @@ static void ext2_splice_branch(struct inode *inode,
|
|||
if (where->bh)
|
||||
mark_buffer_dirty_inode(where->bh, inode);
|
||||
|
||||
inode->i_ctime = CURRENT_TIME_SEC;
|
||||
inode->i_ctime = current_time(inode);
|
||||
mark_inode_dirty(inode);
|
||||
}
|
||||
|
||||
|
|
@ -1308,7 +1308,7 @@ static int ext2_setsize(struct inode *inode, loff_t newsize)
|
|||
__ext2_truncate_blocks(inode, newsize);
|
||||
dax_sem_up_write(EXT2_I(inode));
|
||||
|
||||
inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC;
|
||||
inode->i_mtime = inode->i_ctime = current_time(inode);
|
||||
if (inode_needs_sync(inode)) {
|
||||
sync_mapping_buffers(inode->i_mapping);
|
||||
sync_inode_metadata(inode, 1);
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ long ext2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
|||
ei->i_flags = flags;
|
||||
|
||||
ext2_set_inode_flags(inode);
|
||||
inode->i_ctime = CURRENT_TIME_SEC;
|
||||
inode->i_ctime = current_time(inode);
|
||||
inode_unlock(inode);
|
||||
|
||||
mark_inode_dirty(inode);
|
||||
|
|
@ -103,7 +103,7 @@ setflags_out:
|
|||
}
|
||||
|
||||
inode_lock(inode);
|
||||
inode->i_ctime = CURRENT_TIME_SEC;
|
||||
inode->i_ctime = current_time(inode);
|
||||
inode->i_generation = generation;
|
||||
inode_unlock(inode);
|
||||
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ static int ext2_link (struct dentry * old_dentry, struct inode * dir,
|
|||
if (err)
|
||||
return err;
|
||||
|
||||
inode->i_ctime = CURRENT_TIME_SEC;
|
||||
inode->i_ctime = current_time(inode);
|
||||
inode_inc_link_count(inode);
|
||||
ihold(inode);
|
||||
|
||||
|
|
@ -328,7 +328,8 @@ static int ext2_rmdir (struct inode * dir, struct dentry *dentry)
|
|||
}
|
||||
|
||||
static int ext2_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);
|
||||
|
|
@ -338,6 +339,9 @@ static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry,
|
|||
struct ext2_dir_entry_2 * old_de;
|
||||
int err;
|
||||
|
||||
if (flags & ~RENAME_NOREPLACE)
|
||||
return -EINVAL;
|
||||
|
||||
err = dquot_initialize(old_dir);
|
||||
if (err)
|
||||
goto out;
|
||||
|
|
@ -372,7 +376,7 @@ static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry,
|
|||
if (!new_de)
|
||||
goto out_dir;
|
||||
ext2_set_link(new_dir, new_de, new_page, old_inode, 1);
|
||||
new_inode->i_ctime = CURRENT_TIME_SEC;
|
||||
new_inode->i_ctime = current_time(new_inode);
|
||||
if (dir_de)
|
||||
drop_nlink(new_inode);
|
||||
inode_dec_link_count(new_inode);
|
||||
|
|
@ -388,7 +392,7 @@ static int ext2_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_TIME_SEC;
|
||||
old_inode->i_ctime = current_time(old_inode);
|
||||
mark_inode_dirty(old_inode);
|
||||
|
||||
ext2_delete_entry (old_de, old_page);
|
||||
|
|
|
|||
|
|
@ -1543,7 +1543,7 @@ out:
|
|||
if (inode->i_size < off+len-towrite)
|
||||
i_size_write(inode, off+len-towrite);
|
||||
inode->i_version++;
|
||||
inode->i_mtime = inode->i_ctime = CURRENT_TIME;
|
||||
inode->i_mtime = inode->i_ctime = current_time(inode);
|
||||
mark_inode_dirty(inode);
|
||||
return len - towrite;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -691,7 +691,7 @@ ext2_xattr_set2(struct inode *inode, struct buffer_head *old_bh,
|
|||
|
||||
/* Update the inode. */
|
||||
EXT2_I(inode)->i_file_acl = new_bh ? new_bh->b_blocknr : 0;
|
||||
inode->i_ctime = CURRENT_TIME_SEC;
|
||||
inode->i_ctime = current_time(inode);
|
||||
if (IS_SYNC(inode)) {
|
||||
error = sync_inode_metadata(inode, 1);
|
||||
/* In case sync failed due to ENOSPC the inode was actually
|
||||
|
|
|
|||
Loading…
Reference in a new issue