diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-13 05:28:42 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-13 05:28:42 -0400 |
| commit | 77c688ac87183537ed0fb84ec2cb8fa8ec97c458 (patch) | |
| tree | d18e117e05c0d71463823536165ddd9ad75b6bc5 /drivers/bluetooth | |
| parent | 5e40d331bd72447197f26525f21711c4a265b6a6 (diff) | |
| parent | a457606a6f81cfddfc9da1ef2a8bf2c65a8eb35e (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs updates from Al Viro:
"The big thing in this pile is Eric's unmount-on-rmdir series; we
finally have everything we need for that. The final piece of prereqs
is delayed mntput() - now filesystem shutdown always happens on
shallow stack.
Other than that, we have several new primitives for iov_iter (Matt
Wilcox, culled from his XIP-related series) pushing the conversion to
->read_iter()/ ->write_iter() a bit more, a bunch of fs/dcache.c
cleanups and fixes (including the external name refcounting, which
gives consistent behaviour of d_move() wrt procfs symlinks for long
and short names alike) and assorted cleanups and fixes all over the
place.
This is just the first pile; there's a lot of stuff from various
people that ought to go in this window. Starting with
unionmount/overlayfs mess... ;-/"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (60 commits)
fs/file_table.c: Update alloc_file() comment
vfs: Deduplicate code shared by xattr system calls operating on paths
reiserfs: remove pointless forward declaration of struct nameidata
don't need that forward declaration of struct nameidata in dcache.h anymore
take dname_external() into fs/dcache.c
let path_init() failures treated the same way as subsequent link_path_walk()
fix misuses of f_count() in ppp and netlink
ncpfs: use list_for_each_entry() for d_subdirs walk
vfs: move getname() from callers to do_mount()
gfs2_atomic_open(): skip lookups on hashed dentry
[infiniband] remove pointless assignments
gadgetfs: saner API for gadgetfs_create_file()
f_fs: saner API for ffs_sb_create_file()
jfs: don't hash direct inode
[s390] remove pointless assignment of ->f_op in vmlogrdr ->open()
ecryptfs: ->f_op is never NULL
android: ->f_op is never NULL
nouveau: __iomem misannotations
missing annotation in fs/file.c
fs: namespace: suppress 'may be used uninitialized' warnings
...
Diffstat (limited to 'drivers/bluetooth')
| -rw-r--r-- | drivers/bluetooth/hci_vhci.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c index 5bb5872ffee6..6653473f2757 100644 --- a/drivers/bluetooth/hci_vhci.c +++ b/drivers/bluetooth/hci_vhci.c | |||
| @@ -160,13 +160,11 @@ static int vhci_create_device(struct vhci_data *data, __u8 opcode) | |||
| 160 | } | 160 | } |
| 161 | 161 | ||
| 162 | static inline ssize_t vhci_get_user(struct vhci_data *data, | 162 | static inline ssize_t vhci_get_user(struct vhci_data *data, |
| 163 | const struct iovec *iov, | 163 | struct iov_iter *from) |
| 164 | unsigned long count) | ||
| 165 | { | 164 | { |
| 166 | size_t len = iov_length(iov, count); | 165 | size_t len = iov_iter_count(from); |
| 167 | struct sk_buff *skb; | 166 | struct sk_buff *skb; |
| 168 | __u8 pkt_type, opcode; | 167 | __u8 pkt_type, opcode; |
| 169 | unsigned long i; | ||
| 170 | int ret; | 168 | int ret; |
| 171 | 169 | ||
| 172 | if (len < 2 || len > HCI_MAX_FRAME_SIZE) | 170 | if (len < 2 || len > HCI_MAX_FRAME_SIZE) |
| @@ -176,12 +174,9 @@ static inline ssize_t vhci_get_user(struct vhci_data *data, | |||
| 176 | if (!skb) | 174 | if (!skb) |
| 177 | return -ENOMEM; | 175 | return -ENOMEM; |
| 178 | 176 | ||
| 179 | for (i = 0; i < count; i++) { | 177 | if (copy_from_iter(skb_put(skb, len), len, from) != len) { |
| 180 | if (copy_from_user(skb_put(skb, iov[i].iov_len), | 178 | kfree_skb(skb); |
| 181 | iov[i].iov_base, iov[i].iov_len)) { | 179 | return -EFAULT; |
| 182 | kfree_skb(skb); | ||
| 183 | return -EFAULT; | ||
| 184 | } | ||
| 185 | } | 180 | } |
| 186 | 181 | ||
| 187 | pkt_type = *((__u8 *) skb->data); | 182 | pkt_type = *((__u8 *) skb->data); |
| @@ -294,13 +289,12 @@ static ssize_t vhci_read(struct file *file, | |||
| 294 | return ret; | 289 | return ret; |
| 295 | } | 290 | } |
| 296 | 291 | ||
| 297 | static ssize_t vhci_write(struct kiocb *iocb, const struct iovec *iov, | 292 | static ssize_t vhci_write(struct kiocb *iocb, struct iov_iter *from) |
| 298 | unsigned long count, loff_t pos) | ||
| 299 | { | 293 | { |
| 300 | struct file *file = iocb->ki_filp; | 294 | struct file *file = iocb->ki_filp; |
| 301 | struct vhci_data *data = file->private_data; | 295 | struct vhci_data *data = file->private_data; |
| 302 | 296 | ||
| 303 | return vhci_get_user(data, iov, count); | 297 | return vhci_get_user(data, from); |
| 304 | } | 298 | } |
| 305 | 299 | ||
| 306 | static unsigned int vhci_poll(struct file *file, poll_table *wait) | 300 | static unsigned int vhci_poll(struct file *file, poll_table *wait) |
| @@ -365,7 +359,7 @@ static int vhci_release(struct inode *inode, struct file *file) | |||
| 365 | static const struct file_operations vhci_fops = { | 359 | static const struct file_operations vhci_fops = { |
| 366 | .owner = THIS_MODULE, | 360 | .owner = THIS_MODULE, |
| 367 | .read = vhci_read, | 361 | .read = vhci_read, |
| 368 | .aio_write = vhci_write, | 362 | .write_iter = vhci_write, |
| 369 | .poll = vhci_poll, | 363 | .poll = vhci_poll, |
| 370 | .open = vhci_open, | 364 | .open = vhci_open, |
| 371 | .release = vhci_release, | 365 | .release = vhci_release, |
