mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -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
|
|
@ -143,7 +143,7 @@ static int omfs_add_link(struct dentry *dentry, struct inode *inode)
|
|||
mark_buffer_dirty(bh);
|
||||
brelse(bh);
|
||||
|
||||
dir->i_ctime = CURRENT_TIME_SEC;
|
||||
dir->i_ctime = current_time(dir);
|
||||
|
||||
/* mark affected inodes dirty to rebuild checksums */
|
||||
mark_inode_dirty(dir);
|
||||
|
|
@ -371,12 +371,16 @@ static bool omfs_fill_chain(struct inode *dir, struct dir_context *ctx,
|
|||
}
|
||||
|
||||
static int omfs_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 *new_inode = d_inode(new_dentry);
|
||||
struct inode *old_inode = d_inode(old_dentry);
|
||||
int err;
|
||||
|
||||
if (flags & ~RENAME_NOREPLACE)
|
||||
return -EINVAL;
|
||||
|
||||
if (new_inode) {
|
||||
/* overwriting existing file/dir */
|
||||
err = omfs_remove(new_dir, new_dentry);
|
||||
|
|
@ -395,7 +399,7 @@ static int omfs_rename(struct inode *old_dir, struct dentry *old_dentry,
|
|||
if (err)
|
||||
goto out;
|
||||
|
||||
old_inode->i_ctime = CURRENT_TIME_SEC;
|
||||
old_inode->i_ctime = current_time(old_inode);
|
||||
mark_inode_dirty(old_inode);
|
||||
out:
|
||||
return err;
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ struct inode *omfs_new_inode(struct inode *dir, umode_t mode)
|
|||
inode_init_owner(inode, NULL, mode);
|
||||
inode->i_mapping->a_ops = &omfs_aops;
|
||||
|
||||
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
|
||||
inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
|
||||
switch (mode & S_IFMT) {
|
||||
case S_IFDIR:
|
||||
inode->i_op = &omfs_dir_inops;
|
||||
|
|
|
|||
Loading…
Reference in a new issue