summaryrefslogtreecommitdiffstats
path: root/fs/devpts
diff options
context:
space:
mode:
authorJeff Layton2018-01-30 21:32:21 +0100
committerLinus Torvalds2018-01-31 17:43:35 +0100
commitc0cef30e4ff0dc025f4a1660b8f0ba43ed58426e (patch)
tree8be4d90a4eb4f64bf0569e7b9e9bf88112722776 /fs/devpts
parentMerge tag 'f2fs-for-4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/gi... (diff)
downloadkernel-qcow2-linux-c0cef30e4ff0dc025f4a1660b8f0ba43ed58426e.tar.gz
kernel-qcow2-linux-c0cef30e4ff0dc025f4a1660b8f0ba43ed58426e.tar.xz
kernel-qcow2-linux-c0cef30e4ff0dc025f4a1660b8f0ba43ed58426e.zip
iversion: make inode_cmp_iversion{+raw} return bool instead of s64
As Linus points out: The inode_cmp_iversion{+raw}() functions are pure and utter crap. Why? You say that they return 0/negative/positive, but they do so in a completely broken manner. They return that ternary value as the sequence number difference in a 's64', which means that if you actually care about that ternary value, and do the *sane* thing that the kernel-doc of the function implies is the right thing, you would do int cmp = inode_cmp_iversion(inode, old); if (cmp < 0 ... and as a result you get code that looks sane, but that doesn't actually *WORK* right. Since none of the callers actually care about the ternary value here, convert the inode_cmp_iversion{+raw} functions to just return a boolean value (false for matching, true for non-matching). This matches the existing use of these functions just fine, and makes it simple to convert them to return a ternary value in the future if we grow callers that need it. With this change we can also reimplement inode_cmp_iversion in a simpler way using inode_peek_iversion. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/devpts')
0 files changed, 0 insertions, 0 deletions