diff options
-rw-r--r-- | include/linux/iversion.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/iversion.h b/include/linux/iversion.h index d61e063f7c75..f268828f9f7e 100644 --- a/include/linux/iversion.h +++ b/include/linux/iversion.h @@ -110,12 +110,13 @@ inode_set_iversion_queried(struct inode *inode, u64 new) static inline bool inode_maybe_inc_iversion(struct inode *inode, bool force) { - spin_lock(&inode->i_lock); - inode->i_version++; - spin_unlock(&inode->i_lock); + atomic64_t *ivp = (atomic64_t *)&inode->i_version; + + atomic64_inc(ivp); return true; } + /** * inode_inc_iversion - forcibly increment i_version * @inode: inode that needs to be updated |