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
4545 *
4646 * With this implementation, the value should always appear to observers to
4747 * 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.
4949 *
5050 * Note that some filesystems (e.g. NFS and AFS) just use the field to store
5151 * 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
305305 }
306306
307307 /**
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
309309 * @inode: inode to check
310310 * @old: old value to check against its i_version
311311 *
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.
314314 */
315315 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)
317317 {
318− return inode_peek_iversion_raw(inode) != old;
318+ return inode_peek_iversion_raw(inode) == old;
319319 }
320320
321321 /**
322− * inode_cmp_iversion - check whether the i_version counter has changed
322+ * inode_eq_iversion - check whether the i_version counter has changed
323323 * @inode: inode to check
324324 * @old: old value to check against its i_version
325325 *
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.
328328 *
329329 * Note that we don't need to set the QUERIED flag in this case, as the value
330330 * in the inode is not being recorded for later use.
331331 */
332332 static inline bool
333−inode_cmp_iversion(const struct inode *inode, u64 old)
333+inode_eq_iversion(const struct inode *inode, u64 old)
334334 {
335− return inode_peek_iversion(inode) != old;
335+ return inode_peek_iversion(inode) == old;
336336 }
337337 #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