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/jfs | |
| 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/jfs')
| -rw-r--r-- | fs/jfs/acl.c | 2 | ||||
| -rw-r--r-- | fs/jfs/inode.c | 2 | ||||
| -rw-r--r-- | fs/jfs/jfs_inode.c | 2 | ||||
| -rw-r--r-- | fs/jfs/namei.c | 29 | ||||
| -rw-r--r-- | fs/jfs/super.c | 2 | ||||
| -rw-r--r-- | fs/jfs/xattr.c | 2 |
6 files changed, 21 insertions, 18 deletions
diff --git a/fs/jfs/acl.c b/fs/jfs/acl.c index 3a1e1554a4e3..7bc186f4ed4d 100644 --- a/fs/jfs/acl.c +++ b/fs/jfs/acl.c | |||
| @@ -81,7 +81,7 @@ static int __jfs_set_acl(tid_t tid, struct inode *inode, int type, | |||
| 81 | rc = posix_acl_update_mode(inode, &inode->i_mode, &acl); | 81 | rc = posix_acl_update_mode(inode, &inode->i_mode, &acl); |
| 82 | if (rc) | 82 | if (rc) |
| 83 | return rc; | 83 | return rc; |
| 84 | inode->i_ctime = CURRENT_TIME; | 84 | inode->i_ctime = current_time(inode); |
| 85 | mark_inode_dirty(inode); | 85 | mark_inode_dirty(inode); |
| 86 | } | 86 | } |
| 87 | break; | 87 | break; |
diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c index ad3e7b1effc4..054cc761b426 100644 --- a/fs/jfs/inode.c +++ b/fs/jfs/inode.c | |||
| @@ -403,7 +403,7 @@ void jfs_truncate_nolock(struct inode *ip, loff_t length) | |||
| 403 | break; | 403 | break; |
| 404 | } | 404 | } |
| 405 | 405 | ||
| 406 | ip->i_mtime = ip->i_ctime = CURRENT_TIME; | 406 | ip->i_mtime = ip->i_ctime = current_time(ip); |
| 407 | mark_inode_dirty(ip); | 407 | mark_inode_dirty(ip); |
| 408 | 408 | ||
| 409 | txCommit(tid, 1, &ip, 0); | 409 | txCommit(tid, 1, &ip, 0); |
diff --git a/fs/jfs/jfs_inode.c b/fs/jfs/jfs_inode.c index 5e33cb9a190d..375dd257a34f 100644 --- a/fs/jfs/jfs_inode.c +++ b/fs/jfs/jfs_inode.c | |||
| @@ -131,7 +131,7 @@ struct inode *ialloc(struct inode *parent, umode_t mode) | |||
| 131 | jfs_inode->mode2 |= inode->i_mode; | 131 | jfs_inode->mode2 |= inode->i_mode; |
| 132 | 132 | ||
| 133 | inode->i_blocks = 0; | 133 | inode->i_blocks = 0; |
| 134 | inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; | 134 | inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode); |
| 135 | jfs_inode->otime = inode->i_ctime.tv_sec; | 135 | jfs_inode->otime = inode->i_ctime.tv_sec; |
| 136 | inode->i_generation = JFS_SBI(sb)->gengen++; | 136 | inode->i_generation = JFS_SBI(sb)->gengen++; |
| 137 | 137 | ||
diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c index e420c6088336..b41596d71858 100644 --- a/fs/jfs/namei.c +++ b/fs/jfs/namei.c | |||
| @@ -162,7 +162,7 @@ static int jfs_create(struct inode *dip, struct dentry *dentry, umode_t mode, | |||
| 162 | 162 | ||
| 163 | mark_inode_dirty(ip); | 163 | mark_inode_dirty(ip); |
| 164 | 164 | ||
| 165 | dip->i_ctime = dip->i_mtime = CURRENT_TIME; | 165 | dip->i_ctime = dip->i_mtime = current_time(dip); |
| 166 | 166 | ||
| 167 | mark_inode_dirty(dip); | 167 | mark_inode_dirty(dip); |
| 168 | 168 | ||
| @@ -298,7 +298,7 @@ static int jfs_mkdir(struct inode *dip, struct dentry *dentry, umode_t mode) | |||
| 298 | 298 | ||
| 299 | /* update parent directory inode */ | 299 | /* update parent directory inode */ |
| 300 | inc_nlink(dip); /* for '..' from child directory */ | 300 | inc_nlink(dip); /* for '..' from child directory */ |
| 301 | dip->i_ctime = dip->i_mtime = CURRENT_TIME; | 301 | dip->i_ctime = dip->i_mtime = current_time(dip); |
| 302 | mark_inode_dirty(dip); | 302 | mark_inode_dirty(dip); |
| 303 | 303 | ||
| 304 | rc = txCommit(tid, 2, &iplist[0], 0); | 304 | rc = txCommit(tid, 2, &iplist[0], 0); |
| @@ -406,7 +406,7 @@ static int jfs_rmdir(struct inode *dip, struct dentry *dentry) | |||
| 406 | /* update parent directory's link count corresponding | 406 | /* update parent directory's link count corresponding |
| 407 | * to ".." entry of the target directory deleted | 407 | * to ".." entry of the target directory deleted |
| 408 | */ | 408 | */ |
| 409 | dip->i_ctime = dip->i_mtime = CURRENT_TIME; | 409 | dip->i_ctime = dip->i_mtime = current_time(dip); |
| 410 | inode_dec_link_count(dip); | 410 | inode_dec_link_count(dip); |
| 411 | 411 | ||
| 412 | /* | 412 | /* |
| @@ -528,7 +528,7 @@ static int jfs_unlink(struct inode *dip, struct dentry *dentry) | |||
| 528 | 528 | ||
| 529 | ASSERT(ip->i_nlink); | 529 | ASSERT(ip->i_nlink); |
| 530 | 530 | ||
| 531 | ip->i_ctime = dip->i_ctime = dip->i_mtime = CURRENT_TIME; | 531 | ip->i_ctime = dip->i_ctime = dip->i_mtime = current_time(ip); |
| 532 | mark_inode_dirty(dip); | 532 | mark_inode_dirty(dip); |
| 533 | 533 | ||
| 534 | /* update target's inode */ | 534 | /* update target's inode */ |
| @@ -838,8 +838,8 @@ static int jfs_link(struct dentry *old_dentry, | |||
| 838 | 838 | ||
| 839 | /* update object inode */ | 839 | /* update object inode */ |
| 840 | inc_nlink(ip); /* for new link */ | 840 | inc_nlink(ip); /* for new link */ |
| 841 | ip->i_ctime = CURRENT_TIME; | 841 | ip->i_ctime = current_time(ip); |
| 842 | dir->i_ctime = dir->i_mtime = CURRENT_TIME; | 842 | dir->i_ctime = dir->i_mtime = current_time(dir); |
| 843 | mark_inode_dirty(dir); | 843 | mark_inode_dirty(dir); |
| 844 | ihold(ip); | 844 | ihold(ip); |
| 845 | 845 | ||
| @@ -1039,7 +1039,7 @@ static int jfs_symlink(struct inode *dip, struct dentry *dentry, | |||
| 1039 | 1039 | ||
| 1040 | mark_inode_dirty(ip); | 1040 | mark_inode_dirty(ip); |
| 1041 | 1041 | ||
| 1042 | dip->i_ctime = dip->i_mtime = CURRENT_TIME; | 1042 | dip->i_ctime = dip->i_mtime = current_time(dip); |
| 1043 | mark_inode_dirty(dip); | 1043 | mark_inode_dirty(dip); |
| 1044 | /* | 1044 | /* |
| 1045 | * commit update of parent directory and link object | 1045 | * commit update of parent directory and link object |
| @@ -1078,7 +1078,8 @@ static int jfs_symlink(struct inode *dip, struct dentry *dentry, | |||
| 1078 | * FUNCTION: rename a file or directory | 1078 | * FUNCTION: rename a file or directory |
| 1079 | */ | 1079 | */ |
| 1080 | static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry, | 1080 | static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry, |
| 1081 | struct inode *new_dir, struct dentry *new_dentry) | 1081 | struct inode *new_dir, struct dentry *new_dentry, |
| 1082 | unsigned int flags) | ||
| 1082 | { | 1083 | { |
| 1083 | struct btstack btstack; | 1084 | struct btstack btstack; |
| 1084 | ino_t ino; | 1085 | ino_t ino; |
| @@ -1097,6 +1098,8 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
| 1097 | s64 new_size = 0; | 1098 | s64 new_size = 0; |
| 1098 | int commit_flag; | 1099 | int commit_flag; |
| 1099 | 1100 | ||
| 1101 | if (flags & ~RENAME_NOREPLACE) | ||
| 1102 | return -EINVAL; | ||
| 1100 | 1103 | ||
| 1101 | jfs_info("jfs_rename: %pd %pd", old_dentry, new_dentry); | 1104 | jfs_info("jfs_rename: %pd %pd", old_dentry, new_dentry); |
| 1102 | 1105 | ||
| @@ -1215,7 +1218,7 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
| 1215 | tblk->xflag |= COMMIT_DELETE; | 1218 | tblk->xflag |= COMMIT_DELETE; |
| 1216 | tblk->u.ip = new_ip; | 1219 | tblk->u.ip = new_ip; |
| 1217 | } else { | 1220 | } else { |
| 1218 | new_ip->i_ctime = CURRENT_TIME; | 1221 | new_ip->i_ctime = current_time(new_ip); |
| 1219 | mark_inode_dirty(new_ip); | 1222 | mark_inode_dirty(new_ip); |
| 1220 | } | 1223 | } |
| 1221 | } else { | 1224 | } else { |
| @@ -1278,10 +1281,10 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
| 1278 | /* | 1281 | /* |
| 1279 | * Update ctime on changed/moved inodes & mark dirty | 1282 | * Update ctime on changed/moved inodes & mark dirty |
| 1280 | */ | 1283 | */ |
| 1281 | old_ip->i_ctime = CURRENT_TIME; | 1284 | old_ip->i_ctime = current_time(old_ip); |
| 1282 | mark_inode_dirty(old_ip); | 1285 | mark_inode_dirty(old_ip); |
| 1283 | 1286 | ||
| 1284 | new_dir->i_ctime = new_dir->i_mtime = current_fs_time(new_dir->i_sb); | 1287 | new_dir->i_ctime = new_dir->i_mtime = current_time(new_dir); |
| 1285 | mark_inode_dirty(new_dir); | 1288 | mark_inode_dirty(new_dir); |
| 1286 | 1289 | ||
| 1287 | /* Build list of inodes modified by this transaction */ | 1290 | /* Build list of inodes modified by this transaction */ |
| @@ -1293,7 +1296,7 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
| 1293 | 1296 | ||
| 1294 | if (old_dir != new_dir) { | 1297 | if (old_dir != new_dir) { |
| 1295 | iplist[ipcount++] = new_dir; | 1298 | iplist[ipcount++] = new_dir; |
| 1296 | old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME; | 1299 | old_dir->i_ctime = old_dir->i_mtime = current_time(old_dir); |
| 1297 | mark_inode_dirty(old_dir); | 1300 | mark_inode_dirty(old_dir); |
| 1298 | } | 1301 | } |
| 1299 | 1302 | ||
| @@ -1426,7 +1429,7 @@ static int jfs_mknod(struct inode *dir, struct dentry *dentry, | |||
| 1426 | 1429 | ||
| 1427 | mark_inode_dirty(ip); | 1430 | mark_inode_dirty(ip); |
| 1428 | 1431 | ||
| 1429 | dir->i_ctime = dir->i_mtime = CURRENT_TIME; | 1432 | dir->i_ctime = dir->i_mtime = current_time(dir); |
| 1430 | 1433 | ||
| 1431 | mark_inode_dirty(dir); | 1434 | mark_inode_dirty(dir); |
| 1432 | 1435 | ||
diff --git a/fs/jfs/super.c b/fs/jfs/super.c index cec8814a3b8b..85671f7f8518 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c | |||
| @@ -830,7 +830,7 @@ out: | |||
| 830 | if (inode->i_size < off+len-towrite) | 830 | if (inode->i_size < off+len-towrite) |
| 831 | i_size_write(inode, off+len-towrite); | 831 | i_size_write(inode, off+len-towrite); |
| 832 | inode->i_version++; | 832 | inode->i_version++; |
| 833 | inode->i_mtime = inode->i_ctime = CURRENT_TIME; | 833 | inode->i_mtime = inode->i_ctime = current_time(inode); |
| 834 | mark_inode_dirty(inode); | 834 | mark_inode_dirty(inode); |
| 835 | inode_unlock(inode); | 835 | inode_unlock(inode); |
| 836 | return len - towrite; | 836 | return len - towrite; |
diff --git a/fs/jfs/xattr.c b/fs/jfs/xattr.c index 0bf3c33aedff..c60f3d32ee91 100644 --- a/fs/jfs/xattr.c +++ b/fs/jfs/xattr.c | |||
| @@ -658,7 +658,7 @@ static int ea_put(tid_t tid, struct inode *inode, struct ea_buffer *ea_buf, | |||
| 658 | if (old_blocks) | 658 | if (old_blocks) |
| 659 | dquot_free_block(inode, old_blocks); | 659 | dquot_free_block(inode, old_blocks); |
| 660 | 660 | ||
| 661 | inode->i_ctime = CURRENT_TIME; | 661 | inode->i_ctime = current_time(inode); |
| 662 | 662 | ||
| 663 | return 0; | 663 | return 0; |
| 664 | } | 664 | } |
