mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -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
|
|
@ -836,7 +836,7 @@ static int do_strip(struct gfs2_inode *ip, struct buffer_head *dibh,
|
|||
gfs2_quota_change(ip, -(s64)btotal, ip->i_inode.i_uid,
|
||||
ip->i_inode.i_gid);
|
||||
|
||||
ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME;
|
||||
ip->i_inode.i_mtime = ip->i_inode.i_ctime = current_time(&ip->i_inode);
|
||||
|
||||
gfs2_dinode_out(ip, dibh->b_data);
|
||||
|
||||
|
|
@ -1063,7 +1063,7 @@ static int trunc_start(struct inode *inode, u64 oldsize, u64 newsize)
|
|||
}
|
||||
|
||||
i_size_write(inode, newsize);
|
||||
ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME;
|
||||
ip->i_inode.i_mtime = ip->i_inode.i_ctime = current_time(&ip->i_inode);
|
||||
gfs2_dinode_out(ip, dibh->b_data);
|
||||
|
||||
if (journaled)
|
||||
|
|
@ -1142,7 +1142,7 @@ static int trunc_end(struct gfs2_inode *ip)
|
|||
gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode));
|
||||
gfs2_ordered_del_inode(ip);
|
||||
}
|
||||
ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME;
|
||||
ip->i_inode.i_mtime = ip->i_inode.i_ctime = current_time(&ip->i_inode);
|
||||
ip->i_diskflags &= ~GFS2_DIF_TRUNC_IN_PROG;
|
||||
|
||||
gfs2_trans_add_meta(ip->i_gl, dibh);
|
||||
|
|
@ -1252,7 +1252,7 @@ static int do_grow(struct inode *inode, u64 size)
|
|||
goto do_end_trans;
|
||||
|
||||
i_size_write(inode, size);
|
||||
ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME;
|
||||
ip->i_inode.i_mtime = ip->i_inode.i_ctime = current_time(&ip->i_inode);
|
||||
gfs2_trans_add_meta(ip->i_gl, dibh);
|
||||
gfs2_dinode_out(ip, dibh->b_data);
|
||||
brelse(dibh);
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ static int gfs2_dir_write_stuffed(struct gfs2_inode *ip, const char *buf,
|
|||
memcpy(dibh->b_data + offset + sizeof(struct gfs2_dinode), buf, size);
|
||||
if (ip->i_inode.i_size < offset + size)
|
||||
i_size_write(&ip->i_inode, offset + size);
|
||||
ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME;
|
||||
ip->i_inode.i_mtime = ip->i_inode.i_ctime = current_time(&ip->i_inode);
|
||||
gfs2_dinode_out(ip, dibh->b_data);
|
||||
|
||||
brelse(dibh);
|
||||
|
|
@ -233,7 +233,7 @@ out:
|
|||
|
||||
if (ip->i_inode.i_size < offset + copied)
|
||||
i_size_write(&ip->i_inode, offset + copied);
|
||||
ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME;
|
||||
ip->i_inode.i_mtime = ip->i_inode.i_ctime = current_time(&ip->i_inode);
|
||||
|
||||
gfs2_trans_add_meta(ip->i_gl, dibh);
|
||||
gfs2_dinode_out(ip, dibh->b_data);
|
||||
|
|
@ -872,7 +872,7 @@ static struct gfs2_leaf *new_leaf(struct inode *inode, struct buffer_head **pbh,
|
|||
struct gfs2_leaf *leaf;
|
||||
struct gfs2_dirent *dent;
|
||||
struct qstr name = { .name = "" };
|
||||
struct timespec tv = CURRENT_TIME;
|
||||
struct timespec tv = current_time(inode);
|
||||
|
||||
error = gfs2_alloc_blocks(ip, &bn, &n, 0, NULL);
|
||||
if (error)
|
||||
|
|
@ -1816,7 +1816,7 @@ int gfs2_dir_add(struct inode *inode, const struct qstr *name,
|
|||
gfs2_inum_out(nip, dent);
|
||||
dent->de_type = cpu_to_be16(IF2DT(nip->i_inode.i_mode));
|
||||
dent->de_rahead = cpu_to_be16(gfs2_inode_ra_len(nip));
|
||||
tv = CURRENT_TIME;
|
||||
tv = current_time(&ip->i_inode);
|
||||
if (ip->i_diskflags & GFS2_DIF_EXHASH) {
|
||||
leaf = (struct gfs2_leaf *)bh->b_data;
|
||||
be16_add_cpu(&leaf->lf_entries, 1);
|
||||
|
|
@ -1878,7 +1878,7 @@ int gfs2_dir_del(struct gfs2_inode *dip, const struct dentry *dentry)
|
|||
const struct qstr *name = &dentry->d_name;
|
||||
struct gfs2_dirent *dent, *prev = NULL;
|
||||
struct buffer_head *bh;
|
||||
struct timespec tv = CURRENT_TIME;
|
||||
struct timespec tv = current_time(&dip->i_inode);
|
||||
|
||||
/* Returns _either_ the entry (if its first in block) or the
|
||||
previous entry otherwise */
|
||||
|
|
@ -1960,7 +1960,7 @@ int gfs2_dir_mvino(struct gfs2_inode *dip, const struct qstr *filename,
|
|||
gfs2_trans_add_meta(dip->i_gl, bh);
|
||||
}
|
||||
|
||||
dip->i_inode.i_mtime = dip->i_inode.i_ctime = CURRENT_TIME;
|
||||
dip->i_inode.i_mtime = dip->i_inode.i_ctime = current_time(&dip->i_inode);
|
||||
gfs2_dinode_out(dip, bh->b_data);
|
||||
brelse(bh);
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -656,7 +656,7 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
|
|||
set_nlink(inode, S_ISDIR(mode) ? 2 : 1);
|
||||
inode->i_rdev = dev;
|
||||
inode->i_size = size;
|
||||
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
|
||||
inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
|
||||
gfs2_set_inode_blocks(inode, 1);
|
||||
munge_mode_uid_gid(dip, inode);
|
||||
check_and_update_goal(dip);
|
||||
|
|
@ -983,7 +983,7 @@ static int gfs2_link(struct dentry *old_dentry, struct inode *dir,
|
|||
|
||||
gfs2_trans_add_meta(ip->i_gl, dibh);
|
||||
inc_nlink(&ip->i_inode);
|
||||
ip->i_inode.i_ctime = CURRENT_TIME;
|
||||
ip->i_inode.i_ctime = current_time(&ip->i_inode);
|
||||
ihold(inode);
|
||||
d_instantiate(dentry, inode);
|
||||
mark_inode_dirty(inode);
|
||||
|
|
@ -1067,7 +1067,7 @@ static int gfs2_unlink_inode(struct gfs2_inode *dip,
|
|||
return error;
|
||||
|
||||
ip->i_entries = 0;
|
||||
inode->i_ctime = CURRENT_TIME;
|
||||
inode->i_ctime = current_time(inode);
|
||||
if (S_ISDIR(inode->i_mode))
|
||||
clear_nlink(inode);
|
||||
else
|
||||
|
|
@ -1330,7 +1330,7 @@ static int update_moved_ino(struct gfs2_inode *ip, struct gfs2_inode *ndip,
|
|||
error = gfs2_meta_inode_buffer(ip, &dibh);
|
||||
if (error)
|
||||
return error;
|
||||
ip->i_inode.i_ctime = CURRENT_TIME;
|
||||
ip->i_inode.i_ctime = current_time(&ip->i_inode);
|
||||
gfs2_trans_add_meta(ip->i_gl, dibh);
|
||||
gfs2_dinode_out(ip, dibh->b_data);
|
||||
brelse(dibh);
|
||||
|
|
@ -2055,7 +2055,7 @@ const struct inode_operations gfs2_dir_iops = {
|
|||
.mkdir = gfs2_mkdir,
|
||||
.rmdir = gfs2_unlink,
|
||||
.mknod = gfs2_mknod,
|
||||
.rename2 = gfs2_rename2,
|
||||
.rename = gfs2_rename2,
|
||||
.permission = gfs2_permission,
|
||||
.setattr = gfs2_setattr,
|
||||
.getattr = gfs2_getattr,
|
||||
|
|
|
|||
|
|
@ -854,7 +854,7 @@ static int gfs2_adjust_quota(struct gfs2_inode *ip, loff_t loc,
|
|||
size = loc + sizeof(struct gfs2_quota);
|
||||
if (size > inode->i_size)
|
||||
i_size_write(inode, size);
|
||||
inode->i_mtime = inode->i_atime = CURRENT_TIME;
|
||||
inode->i_mtime = inode->i_atime = current_time(inode);
|
||||
mark_inode_dirty(inode);
|
||||
set_bit(QDF_REFRESH, &qd->qd_flags);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -309,7 +309,7 @@ static int ea_dealloc_unstuffed(struct gfs2_inode *ip, struct buffer_head *bh,
|
|||
|
||||
error = gfs2_meta_inode_buffer(ip, &dibh);
|
||||
if (!error) {
|
||||
ip->i_inode.i_ctime = CURRENT_TIME;
|
||||
ip->i_inode.i_ctime = current_time(&ip->i_inode);
|
||||
gfs2_trans_add_meta(ip->i_gl, dibh);
|
||||
gfs2_dinode_out(ip, dibh->b_data);
|
||||
brelse(dibh);
|
||||
|
|
@ -775,7 +775,7 @@ static int ea_alloc_skeleton(struct gfs2_inode *ip, struct gfs2_ea_request *er,
|
|||
|
||||
error = gfs2_meta_inode_buffer(ip, &dibh);
|
||||
if (!error) {
|
||||
ip->i_inode.i_ctime = CURRENT_TIME;
|
||||
ip->i_inode.i_ctime = current_time(&ip->i_inode);
|
||||
gfs2_trans_add_meta(ip->i_gl, dibh);
|
||||
gfs2_dinode_out(ip, dibh->b_data);
|
||||
brelse(dibh);
|
||||
|
|
@ -910,7 +910,7 @@ static int ea_set_simple_noalloc(struct gfs2_inode *ip, struct buffer_head *bh,
|
|||
error = gfs2_meta_inode_buffer(ip, &dibh);
|
||||
if (error)
|
||||
goto out;
|
||||
ip->i_inode.i_ctime = CURRENT_TIME;
|
||||
ip->i_inode.i_ctime = current_time(&ip->i_inode);
|
||||
gfs2_trans_add_meta(ip->i_gl, dibh);
|
||||
gfs2_dinode_out(ip, dibh->b_data);
|
||||
brelse(dibh);
|
||||
|
|
@ -1133,7 +1133,7 @@ static int ea_remove_stuffed(struct gfs2_inode *ip, struct gfs2_ea_location *el)
|
|||
|
||||
error = gfs2_meta_inode_buffer(ip, &dibh);
|
||||
if (!error) {
|
||||
ip->i_inode.i_ctime = CURRENT_TIME;
|
||||
ip->i_inode.i_ctime = current_time(&ip->i_inode);
|
||||
gfs2_trans_add_meta(ip->i_gl, dibh);
|
||||
gfs2_dinode_out(ip, dibh->b_data);
|
||||
brelse(dibh);
|
||||
|
|
|
|||
Loading…
Reference in a new issue