Message ID | 20171222120556.7435-3-jlayton@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/include/linux/iversion.h b/include/linux/iversion.h index bb50d27c71f9..e08c634779df 100644 --- a/include/linux/iversion.h +++ b/include/linux/iversion.h @@ -104,12 +104,13 @@ inode_set_iversion_queried(struct inode *inode, const 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