aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/iversion.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/iversion.h')
-rw-r--r--include/linux/iversion.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/include/linux/iversion.h b/include/linux/iversion.h
index 3d2fd06495ec..be50ef7cedab 100644
--- a/include/linux/iversion.h
+++ b/include/linux/iversion.h
@@ -45,7 +45,7 @@
45 * 45 *
46 * With this implementation, the value should always appear to observers to 46 * With this implementation, the value should always appear to observers to
47 * increase over time if the file has changed. It's recommended to use 47 * increase over time if the file has changed. It's recommended to use
48 * inode_cmp_iversion() helper to compare values. 48 * inode_eq_iversion() helper to compare values.
49 * 49 *
50 * Note that some filesystems (e.g. NFS and AFS) just use the field to store 50 * Note that some filesystems (e.g. NFS and AFS) just use the field to store
51 * a server-provided value (for the most part). For that reason, those 51 * a server-provided value (for the most part). For that reason, those
@@ -305,33 +305,33 @@ inode_query_iversion(struct inode *inode)
305} 305}
306 306
307/** 307/**
308 * inode_cmp_iversion_raw - check whether the raw i_version counter has changed 308 * inode_eq_iversion_raw - check whether the raw i_version counter has changed
309 * @inode: inode to check 309 * @inode: inode to check
310 * @old: old value to check against its i_version 310 * @old: old value to check against its i_version
311 * 311 *
312 * Compare the current raw i_version counter with a previous one. Returns false 312 * Compare the current raw i_version counter with a previous one. Returns true
313 * if they are the same or true if they are different. 313 * if they are the same or false if they are different.
314 */ 314 */
315static inline bool 315static inline bool
316inode_cmp_iversion_raw(const struct inode *inode, u64 old) 316inode_eq_iversion_raw(const struct inode *inode, u64 old)
317{ 317{
318 return inode_peek_iversion_raw(inode) != old; 318 return inode_peek_iversion_raw(inode) == old;
319} 319}
320 320
321/** 321/**
322 * inode_cmp_iversion - check whether the i_version counter has changed 322 * inode_eq_iversion - check whether the i_version counter has changed
323 * @inode: inode to check 323 * @inode: inode to check
324 * @old: old value to check against its i_version 324 * @old: old value to check against its i_version
325 * 325 *
326 * Compare an i_version counter with a previous one. Returns false if they are 326 * Compare an i_version counter with a previous one. Returns true if they are
327 * the same, and true if they are different. 327 * the same, and false if they are different.
328 * 328 *
329 * Note that we don't need to set the QUERIED flag in this case, as the value 329 * Note that we don't need to set the QUERIED flag in this case, as the value
330 * in the inode is not being recorded for later use. 330 * in the inode is not being recorded for later use.
331 */ 331 */
332static inline bool 332static inline bool
333inode_cmp_iversion(const struct inode *inode, u64 old) 333inode_eq_iversion(const struct inode *inode, u64 old)
334{ 334{
335 return inode_peek_iversion(inode) != old; 335 return inode_peek_iversion(inode) == old;
336} 336}
337#endif 337#endif