diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2024-05-31 22:10:12 -0400 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2024-11-03 01:28:06 -0500 |
| commit | d7a9616ce0348b9d945d5dff82e4b44c0fe75b39 (patch) | |
| tree | c957950cdddf4cf405fca069fe2519b851e42028 /arch/alpha | |
| parent | 048181992cade404028c287241f570657195c81d (diff) | |
| download | linux-d7a9616ce0348b9d945d5dff82e4b44c0fe75b39.tar.gz linux-d7a9616ce0348b9d945d5dff82e4b44c0fe75b39.tar.bz2 linux-d7a9616ce0348b9d945d5dff82e4b44c0fe75b39.zip | |
introduce "fd_pos" class, convert fdget_pos() users to it.
fdget_pos() for constructor, fdput_pos() for cleanup, all users of
fd..._pos() converted trivially.
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/alpha')
| -rw-r--r-- | arch/alpha/kernel/osf_sys.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index c0424de9e7cd..86185021f75a 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c @@ -152,7 +152,7 @@ SYSCALL_DEFINE4(osf_getdirentries, unsigned int, fd, long __user *, basep) { int error; - struct fd arg = fdget_pos(fd); + CLASS(fd_pos, arg)(fd); struct osf_dirent_callback buf = { .ctx.actor = osf_filldir, .dirent = dirent, @@ -160,7 +160,7 @@ SYSCALL_DEFINE4(osf_getdirentries, unsigned int, fd, .count = count }; - if (!fd_file(arg)) + if (fd_empty(arg)) return -EBADF; error = iterate_dir(fd_file(arg), &buf.ctx); @@ -169,7 +169,6 @@ SYSCALL_DEFINE4(osf_getdirentries, unsigned int, fd, if (count != buf.count) error = count - buf.count; - fdput_pos(arg); return error; } |
