diff options
author | Jeff Layton <jlayton@redhat.com> | 2017-12-11 12:35:13 +0100 |
---|---|---|
committer | Jeff Layton <jlayton@redhat.com> | 2018-01-29 12:42:20 +0100 |
commit | 317bc9478000b859a683564649d4937ca69c25d4 (patch) | |
tree | ffb1d3e2fc3635933d219f00b151977b6dc7d575 /fs/exofs/dir.c | |
parent | btrfs: convert to new i_version API (diff) | |
download | linux-317bc9478000b859a683564649d4937ca69c25d4.tar.xz linux-317bc9478000b859a683564649d4937ca69c25d4.zip |
exofs: switch to new i_version API
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Diffstat (limited to 'fs/exofs/dir.c')
-rw-r--r-- | fs/exofs/dir.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/exofs/dir.c b/fs/exofs/dir.c index 98233a97b7b8..c5a53fcc43ea 100644 --- a/fs/exofs/dir.c +++ b/fs/exofs/dir.c @@ -31,6 +31,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include <linux/iversion.h> #include "exofs.h" static inline unsigned exofs_chunk_size(struct inode *inode) @@ -60,7 +61,7 @@ static int exofs_commit_chunk(struct page *page, loff_t pos, unsigned len) struct inode *dir = mapping->host; int err = 0; - dir->i_version++; + inode_inc_iversion(dir); if (!PageUptodate(page)) SetPageUptodate(page); @@ -241,7 +242,7 @@ exofs_readdir(struct file *file, struct dir_context *ctx) unsigned long n = pos >> PAGE_SHIFT; unsigned long npages = dir_pages(inode); unsigned chunk_mask = ~(exofs_chunk_size(inode)-1); - int need_revalidate = (file->f_version != inode->i_version); + bool need_revalidate = inode_cmp_iversion(inode, file->f_version); if (pos > inode->i_size - EXOFS_DIR_REC_LEN(1)) return 0; @@ -264,8 +265,8 @@ exofs_readdir(struct file *file, struct dir_context *ctx) chunk_mask); ctx->pos = (n<<PAGE_SHIFT) + offset; } - file->f_version = inode->i_version; - need_revalidate = 0; + file->f_version = inode_query_iversion(inode); + need_revalidate = false; } de = (struct exofs_dir_entry *)(kaddr + offset); limit = kaddr + exofs_last_byte(inode, n) - |