]> git.baikalelectronics.ru Git - kernel.git/commit
file: let pick_file() tell caller it's done
authorChristian Brauner <christian.brauner@ubuntu.com>
Fri, 2 Apr 2021 08:32:21 +0000 (10:32 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Fri, 2 Apr 2021 12:11:10 +0000 (14:11 +0200)
commitf49fd6d3c070d08c4ae9696876c7098320e48dab
tree8a758ff6341ad7ebad0e05a3cbe41bb2c37794a8
parent9b5b872215fe6d1ca6a1ef411f130bd58e269012
file: let pick_file() tell caller it's done

Let pick_file() report back that the fd it was passed exceeded the
maximum fd in that fdtable. This allows us to simplify the caller of
this helper because it doesn't need to care anymore whether the passed
in max_fd is excessive. It can rely on pick_file() telling it that it's
past the last valid fd.

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