diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-10 23:16:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-10 23:16:43 -0400 |
commit | 101105b1717f536ca741f940033996302d4ef191 (patch) | |
tree | 12ab41ae1b1b66105e9fa2ea763356d2be7e8b34 /fs/gfs2/dir.c | |
parent | 35ff96dfd3c9aaa921b3e8dcac76b7697f2dcec0 (diff) | |
parent | 3873691e5ab34fa26948643d038a2b98c4437298 (diff) |
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
Diffstat (limited to 'fs/gfs2/dir.c')
-rw-r--r-- | fs/gfs2/dir.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index db8fbeb62483..3cdde5f5d399 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c | |||
@@ -135,7 +135,7 @@ static int gfs2_dir_write_stuffed(struct gfs2_inode *ip, const char *buf, | |||
135 | memcpy(dibh->b_data + offset + sizeof(struct gfs2_dinode), buf, size); | 135 | memcpy(dibh->b_data + offset + sizeof(struct gfs2_dinode), buf, size); |
136 | if (ip->i_inode.i_size < offset + size) | 136 | if (ip->i_inode.i_size < offset + size) |
137 | i_size_write(&ip->i_inode, offset + size); | 137 | i_size_write(&ip->i_inode, offset + size); |
138 | ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME; | 138 | ip->i_inode.i_mtime = ip->i_inode.i_ctime = current_time(&ip->i_inode); |
139 | gfs2_dinode_out(ip, dibh->b_data); | 139 | gfs2_dinode_out(ip, dibh->b_data); |
140 | 140 | ||
141 | brelse(dibh); | 141 | brelse(dibh); |
@@ -233,7 +233,7 @@ out: | |||
233 | 233 | ||
234 | if (ip->i_inode.i_size < offset + copied) | 234 | if (ip->i_inode.i_size < offset + copied) |
235 | i_size_write(&ip->i_inode, offset + copied); | 235 | i_size_write(&ip->i_inode, offset + copied); |
236 | ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME; | 236 | ip->i_inode.i_mtime = ip->i_inode.i_ctime = current_time(&ip->i_inode); |
237 | 237 | ||
238 | gfs2_trans_add_meta(ip->i_gl, dibh); | 238 | gfs2_trans_add_meta(ip->i_gl, dibh); |
239 | gfs2_dinode_out(ip, dibh->b_data); | 239 | gfs2_dinode_out(ip, dibh->b_data); |
@@ -872,7 +872,7 @@ static struct gfs2_leaf *new_leaf(struct inode *inode, struct buffer_head **pbh, | |||
872 | struct gfs2_leaf *leaf; | 872 | struct gfs2_leaf *leaf; |
873 | struct gfs2_dirent *dent; | 873 | struct gfs2_dirent *dent; |
874 | struct qstr name = { .name = "" }; | 874 | struct qstr name = { .name = "" }; |
875 | struct timespec tv = CURRENT_TIME; | 875 | struct timespec tv = current_time(inode); |
876 | 876 | ||
877 | error = gfs2_alloc_blocks(ip, &bn, &n, 0, NULL); | 877 | error = gfs2_alloc_blocks(ip, &bn, &n, 0, NULL); |
878 | if (error) | 878 | if (error) |
@@ -1816,7 +1816,7 @@ int gfs2_dir_add(struct inode *inode, const struct qstr *name, | |||
1816 | gfs2_inum_out(nip, dent); | 1816 | gfs2_inum_out(nip, dent); |
1817 | dent->de_type = cpu_to_be16(IF2DT(nip->i_inode.i_mode)); | 1817 | dent->de_type = cpu_to_be16(IF2DT(nip->i_inode.i_mode)); |
1818 | dent->de_rahead = cpu_to_be16(gfs2_inode_ra_len(nip)); | 1818 | dent->de_rahead = cpu_to_be16(gfs2_inode_ra_len(nip)); |
1819 | tv = CURRENT_TIME; | 1819 | tv = current_time(&ip->i_inode); |
1820 | if (ip->i_diskflags & GFS2_DIF_EXHASH) { | 1820 | if (ip->i_diskflags & GFS2_DIF_EXHASH) { |
1821 | leaf = (struct gfs2_leaf *)bh->b_data; | 1821 | leaf = (struct gfs2_leaf *)bh->b_data; |
1822 | be16_add_cpu(&leaf->lf_entries, 1); | 1822 | be16_add_cpu(&leaf->lf_entries, 1); |
@@ -1878,7 +1878,7 @@ int gfs2_dir_del(struct gfs2_inode *dip, const struct dentry *dentry) | |||
1878 | const struct qstr *name = &dentry->d_name; | 1878 | const struct qstr *name = &dentry->d_name; |
1879 | struct gfs2_dirent *dent, *prev = NULL; | 1879 | struct gfs2_dirent *dent, *prev = NULL; |
1880 | struct buffer_head *bh; | 1880 | struct buffer_head *bh; |
1881 | struct timespec tv = CURRENT_TIME; | 1881 | struct timespec tv = current_time(&dip->i_inode); |
1882 | 1882 | ||
1883 | /* Returns _either_ the entry (if its first in block) or the | 1883 | /* Returns _either_ the entry (if its first in block) or the |
1884 | previous entry otherwise */ | 1884 | previous entry otherwise */ |
@@ -1960,7 +1960,7 @@ int gfs2_dir_mvino(struct gfs2_inode *dip, const struct qstr *filename, | |||
1960 | gfs2_trans_add_meta(dip->i_gl, bh); | 1960 | gfs2_trans_add_meta(dip->i_gl, bh); |
1961 | } | 1961 | } |
1962 | 1962 | ||
1963 | dip->i_inode.i_mtime = dip->i_inode.i_ctime = CURRENT_TIME; | 1963 | dip->i_inode.i_mtime = dip->i_inode.i_ctime = current_time(&dip->i_inode); |
1964 | gfs2_dinode_out(dip, bh->b_data); | 1964 | gfs2_dinode_out(dip, bh->b_data); |
1965 | brelse(bh); | 1965 | brelse(bh); |
1966 | return 0; | 1966 | return 0; |