]> 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)
commit7e2f64c6e4f5d99ca836ad4f135c48cc4ad42d8c
tree8a758ff6341ad7ebad0e05a3cbe41bb2c37794a8
parent9086e236c373bde35f1893e3588a852f1b6551ba
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