diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-04-24 04:38:10 +0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-04-25 17:24:05 +0400 |
commit | f8f95702f0c4529b0f59488f4509608f0c160e77 (patch) | |
tree | 618c1ed56eb48da11189f1db9216dd92750c9812 /fs/nfs/read.c | |
parent | 3b1253880b7a9e6db54b943b2d40bcf2202f58ab (diff) | |
download | linux-f8f95702f0c4529b0f59488f4509608f0c160e77.tar.xz |
[PATCH] sanitize locate_fd()
* 'file' argument is unused; lose it.
* move setting flags from the caller (dupfd()) to locate_fd();
pass cloexec flag as new argument. Note that files_fdtable()
that used to be in dupfd() isn't needed in the place in
locate_fd() where the moved code ends up - we know that ->file_lock
hadn't been dropped since the last time we calculated fdt because
we can get there only if expand_files() returns 0 and it doesn't
drop/reacquire in that case.
* move getting/dropping ->file_lock into locate_fd(). Now the caller
doesn't need to do anything with files_struct *files anymore and
we can move that inside locate_fd() as well, killing the
struct files_struct * argument.
At that point locate_fd() is extremely similar to get_unused_fd_flags()
and the next patches will merge those two.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/nfs/read.c')
0 files changed, 0 insertions, 0 deletions