Skip to content

Commit

Permalink
fs/ioctl: remove unnecessary __user annotation
Browse files Browse the repository at this point in the history
__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>
  • Loading branch information
Amit Daniel Kachhap authored and Linus Torvalds committed Jan 15, 2022
1 parent 9a25d05 commit a12cf8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a12cf8b

Please sign in to comment.