|
45 | 45 | * |
46 | 46 | * With this implementation, the value should always appear to observers to |
47 | 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 | 50 | * Note that some filesystems (e.g. NFS and AFS) just use the field to store |
51 | 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 | 309 | * @inode: inode to check |
310 | 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 |
313 | | - * if they are the same or true if they are different. |
| 312 | + * Compare the current raw i_version counter with a previous one. Returns true |
| 313 | + * if they are the same or false if they are different. |
314 | 314 | */ |
315 | 315 | static inline bool |
316 | | -inode_cmp_iversion_raw(const struct inode *inode, u64 old) |
| 316 | +inode_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 | 323 | * @inode: inode to check |
324 | 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 |
327 | | - * the same, and true if they are different. |
| 326 | + * Compare an i_version counter with a previous one. Returns true if they are |
| 327 | + * the same, and false if they are different. |
328 | 328 | * |
329 | 329 | * Note that we don't need to set the QUERIED flag in this case, as the value |
330 | 330 | * in the inode is not being recorded for later use. |
331 | 331 | */ |
332 | 332 | static inline bool |
333 | | -inode_cmp_iversion(const struct inode *inode, u64 old) |
| 333 | +inode_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 | 337 | #endif |
0 commit comments