summaryrefslogtreecommitdiffstats
path: root/fs/ext4/inline.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2018-01-09 08:21:39 -0500
committerJeff Layton <jlayton@redhat.com>2018-01-29 06:42:21 -0500
commitee73f9a52a34377887acfa3b76169709e80d577c (patch)
treeba9a452d138fdc8f70dedff190644f4e03435292 /fs/ext4/inline.c
parente1d747d9b6728cc01d5bcbe784a16ba726df4553 (diff)
ext4: convert to new i_version API
Signed-off-by: Jeff Layton <jlayton@redhat.com> Acked-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/inline.c')
-rw-r--r--fs/ext4/inline.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
index 1367553c43bb..a8b987b71173 100644
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -14,6 +14,7 @@
14 14
15#include <linux/iomap.h> 15#include <linux/iomap.h>
16#include <linux/fiemap.h> 16#include <linux/fiemap.h>
17#include <linux/iversion.h>
17 18
18#include "ext4_jbd2.h" 19#include "ext4_jbd2.h"
19#include "ext4.h" 20#include "ext4.h"
@@ -1042,7 +1043,7 @@ static int ext4_add_dirent_to_inline(handle_t *handle,
1042 */ 1043 */
1043 dir->i_mtime = dir->i_ctime = current_time(dir); 1044 dir->i_mtime = dir->i_ctime = current_time(dir);
1044 ext4_update_dx_flag(dir); 1045 ext4_update_dx_flag(dir);
1045 dir->i_version++; 1046 inode_inc_iversion(dir);
1046 return 1; 1047 return 1;
1047} 1048}
1048 1049
@@ -1494,7 +1495,7 @@ int ext4_read_inline_dir(struct file *file,
1494 * dirent right now. Scan from the start of the inline 1495 * dirent right now. Scan from the start of the inline
1495 * dir to make sure. 1496 * dir to make sure.
1496 */ 1497 */
1497 if (file->f_version != inode->i_version) { 1498 if (inode_cmp_iversion(inode, file->f_version)) {
1498 for (i = 0; i < extra_size && i < offset;) { 1499 for (i = 0; i < extra_size && i < offset;) {
1499 /* 1500 /*
1500 * "." is with offset 0 and 1501 * "." is with offset 0 and
@@ -1526,7 +1527,7 @@ int ext4_read_inline_dir(struct file *file,
1526 } 1527 }
1527 offset = i; 1528 offset = i;
1528 ctx->pos = offset; 1529 ctx->pos = offset;
1529 file->f_version = inode->i_version; 1530 file->f_version = inode_query_iversion(inode);
1530 } 1531 }
1531 1532
1532 while (ctx->pos < extra_size) { 1533 while (ctx->pos < extra_size) {