summaryrefslogtreecommitdiff
path: root/fs/ioctl.c
diff options
context:
space:
mode:
authorAmit Daniel Kachhap <amit.kachhap@arm.com>2022-01-14 14:03:55 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2022-01-15 16:30:25 +0200
commita12cf8b32ceed9c60c8bba7c46077ebffbfb9db2 (patch)
tree6226b0e8f8080200f808d62b0a505009acdc35f9 /fs/ioctl.c
parent9a25d051502ca1f19af3fd8e196c408a4a9c9fbb (diff)
downloadlwn-a12cf8b32ceed9c60c8bba7c46077ebffbfb9db2.tar.gz
lwn-a12cf8b32ceed9c60c8bba7c46077ebffbfb9db2.zip
fs/ioctl: remove unnecessary __user annotation
__user annotations are used by the checker (e.g sparse) to mark user pointers. However here __user is applied to a struct directly, without a pointer being directly involved. Although the presence of __user does not cause sparse to emit a warning, __user should be removed for consistency with other uses of offsetof(). Note: No functional changes intended. Link: https://lkml.kernel.org/r/20211122101256.7875-1-amit.kachhap@arm.com Signed-off-by: Amit Daniel Kachhap <amit.kachhap@arm.com> Cc: Vincenzo Frascino <Vincenzo.Frascino@arm.com> Cc: Kevin Brodsky <Kevin.Brodsky@arm.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ioctl.c')
-rw-r--r--fs/ioctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ioctl.c b/fs/ioctl.c
index 504e69578112..1ed097e94af2 100644
--- a/fs/ioctl.c
+++ b/fs/ioctl.c
@@ -430,7 +430,7 @@ static int ioctl_file_dedupe_range(struct file *file,
goto out;
}
- size = offsetof(struct file_dedupe_range __user, info[count]);
+ size = offsetof(struct file_dedupe_range, info[count]);
if (size > PAGE_SIZE) {
ret = -ENOMEM;
goto out;