diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-03-02 15:30:33 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-03-13 21:22:26 -0400 |
commit | d64547999c591c47bfac279fa4027bdbd29c7ea0 (patch) | |
tree | 7365075ce7f4a064fdf56495e5392558acf92562 /fs/bcachefs/chardev.c | |
parent | ba81523eaac3df20ea884603bd67a74089900814 (diff) | |
download | linux-stable-d64547999c591c47bfac279fa4027bdbd29c7ea0.tar.gz linux-stable-d64547999c591c47bfac279fa4027bdbd29c7ea0.tar.bz2 linux-stable-d64547999c591c47bfac279fa4027bdbd29c7ea0.zip |
bcachefs: copy_(to|from)_user_errcode()
we've got some helpers that return errors sanely, move them to a more
common location for use in fs-ioctl.c
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/chardev.c')
-rw-r--r-- | fs/bcachefs/chardev.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/bcachefs/chardev.c b/fs/bcachefs/chardev.c index b584d78cb39c..38defa19d52d 100644 --- a/fs/bcachefs/chardev.c +++ b/fs/bcachefs/chardev.c @@ -22,12 +22,6 @@ #include <linux/slab.h> #include <linux/uaccess.h> -__must_check -static int copy_to_user_errcode(void __user *to, const void *from, unsigned long n) -{ - return copy_to_user(to, from, n) ? -EFAULT : 0; -} - /* returns with ref on ca->ref */ static struct bch_dev *bch2_device_lookup(struct bch_fs *c, u64 dev, unsigned flags) |