History

Merge tag 'iversion-v4.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux

Pull inode->i_version cleanup from Jeff Layton: "Goffredo went ahead and sent a patch to rename this function, and reverse its sense, as we discussed last week. The patch is very straightforward and I figure it's probably best to go ahead and merge this to get the API as settled as possible" * tag 'iversion-v4.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux: iversion: Rename make inode_cmp_iversion{+raw} to inode_eq_iversion{+raw}

Linus Torvalds committed 8 years ago

Commit 6fbac202 parents fe803f8 c472c0711 files · +25 −25Browse files

Showing the changes to include (1 of 11 files). Show all

Unified · Split

include/linux/iversion.h+11−11
@@ -45,7 +45,7 @@ · 44 unmodified lines
45 *45 *
46 * With this implementation, the value should always appear to observers to46 * With this implementation, the value should always appear to observers to
47 * increase over time if the file has changed. It's recommended to use47 * 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 store50 * 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, those51 * a server-provided value (for the most part). For that reason, those
@@ -305,33 +305,33 @@ inode_query_iversion(struct inode *inode) · 253 unmodified lines
305}305}
306 306
307/**307/**
308 * inode_cmp_iversion_raw - check whether the raw i_version counter has changed308 * inode_eq_iversion_raw - check whether the raw i_version counter has changed
309 * @inode: inode to check309 * @inode: inode to check
310 * @old: old value to check against its i_version310 * @old: old value to check against its i_version
311 *311 *
312 * Compare the current raw i_version counter with a previous one. Returns false312 * 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 bool315static 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 changed322 * inode_eq_iversion - check whether the i_version counter has changed
323 * @inode: inode to check323 * @inode: inode to check
324 * @old: old value to check against its i_version324 * @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 are326 * 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 value329 * 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 bool332static 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#endif337#endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t