Message ID | 20171216134656.15561-3-jlayton@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 5001e77342fd..c234fac4bb77 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2136,9 +2136,9 @@ 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; }