file: simplify logic in __close_range()
authorChristian Brauner <christian.brauner@ubuntu.com>
Fri, 2 Apr 2021 08:38:09 +0000 (10:38 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Fri, 2 Apr 2021 12:11:10 +0000 (14:11 +0200)
commit03ba0fe4d09f2eb0a91888caaa057ed67462ae2d
tree6df62d8ad78bb35a18d6361ffbc0d183f687da28
parentf49fd6d3c070d08c4ae9696876c7098320e48dab
file: simplify logic in __close_range()

It never looked too pleasant and it doesn't really buy us anything
anymore now that CLOSE_RANGE_CLOEXEC exists and we need to retake the
current maximum under the lock for it anyway. This also makes the logic
easier to follow.

Cc: Christoph Hellwig <hch@lst.de>
Cc: Giuseppe Scrivano <gscrivan@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
fs/file.c