RFC: ANDROID: fs: sdcardfs: Use inode iversion helpers

Upstream commit f02a9ad1f1 ("fs: handle inode->i_version more efficiently")
converted the inode -> i_version counter to an atomic64_t. So move to using
relevant iversion helper routines for basic operations instead.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
This commit is contained in:
Amit Pundir 2018-03-09 19:51:44 +05:30
parent c6bc8ac9c5
commit 5a796c6f32
3 changed files with 3 additions and 2 deletions

View file

@ -121,7 +121,7 @@ struct inode *sdcardfs_iget(struct super_block *sb, struct inode *lower_inode, u
inode->i_ino = lower_inode->i_ino;
sdcardfs_set_lower_inode(inode, lower_inode);
inode->i_version++;
inode_inc_iversion_raw(inode);
/* use different set of inode ops for symlinks & directories */
if (S_ISDIR(lower_inode->i_mode))

View file

@ -45,6 +45,7 @@
#include <linux/security.h>
#include <linux/string.h>
#include <linux/list.h>
#include <linux/iversion.h>
#include "multiuser.h"
/* the file system name */

View file

@ -219,7 +219,7 @@ static struct inode *sdcardfs_alloc_inode(struct super_block *sb)
spin_lock_init(&i->top_lock);
kref_get(&d->refcount);
i->vfs_inode.i_version = 1;
inode_set_iversion(&i->vfs_inode, 1);
return &i->vfs_inode;
}