diff options
| author | Benjamin LaHaise <bcrl@kvack.org> | 2014-07-14 13:14:27 -0400 |
|---|---|---|
| committer | Benjamin LaHaise <bcrl@kvack.org> | 2014-07-14 13:14:27 -0400 |
| commit | 6e830d53717cf3d5c30c1afce3773ef97e436cd9 (patch) | |
| tree | 9376a0424b8f9fff12d107aa2498e775da20e85d /include/linux | |
| parent | 855ef0dec7271ff7be7381feaaf3f4aed80bd503 (diff) | |
| parent | 263782c1c95bbddbb022dc092fd89a36bb8d5577 (diff) | |
Merge ../aio-fixes
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/bio.h | 13 | ||||
| -rw-r--r-- | include/linux/blkdev.h | 1 | ||||
| -rw-r--r-- | include/linux/elevator.h | 2 | ||||
| -rw-r--r-- | include/linux/kernfs.h | 2 | ||||
| -rw-r--r-- | include/linux/percpu-defs.h | 4 | ||||
| -rw-r--r-- | include/linux/phy.h | 9 | ||||
| -rw-r--r-- | include/linux/ptrace.h | 3 | ||||
| -rw-r--r-- | include/linux/socket.h | 4 | ||||
| -rw-r--r-- | include/linux/uio.h | 19 | ||||
| -rw-r--r-- | include/linux/usb_usual.h | 4 |
10 files changed, 47 insertions, 14 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index 5a645769f020..d2633ee099d9 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
| @@ -186,6 +186,15 @@ static inline void *bio_data(struct bio *bio) | |||
| 186 | #define BIOVEC_SEG_BOUNDARY(q, b1, b2) \ | 186 | #define BIOVEC_SEG_BOUNDARY(q, b1, b2) \ |
| 187 | __BIO_SEG_BOUNDARY(bvec_to_phys((b1)), bvec_to_phys((b2)) + (b2)->bv_len, queue_segment_boundary((q))) | 187 | __BIO_SEG_BOUNDARY(bvec_to_phys((b1)), bvec_to_phys((b2)) + (b2)->bv_len, queue_segment_boundary((q))) |
| 188 | 188 | ||
| 189 | /* | ||
| 190 | * Check if adding a bio_vec after bprv with offset would create a gap in | ||
| 191 | * the SG list. Most drivers don't care about this, but some do. | ||
| 192 | */ | ||
| 193 | static inline bool bvec_gap_to_prev(struct bio_vec *bprv, unsigned int offset) | ||
| 194 | { | ||
| 195 | return offset || ((bprv->bv_offset + bprv->bv_len) & (PAGE_SIZE - 1)); | ||
| 196 | } | ||
| 197 | |||
| 189 | #define bio_io_error(bio) bio_endio((bio), -EIO) | 198 | #define bio_io_error(bio) bio_endio((bio), -EIO) |
| 190 | 199 | ||
| 191 | /* | 200 | /* |
| @@ -644,10 +653,6 @@ struct biovec_slab { | |||
| 644 | 653 | ||
| 645 | #if defined(CONFIG_BLK_DEV_INTEGRITY) | 654 | #if defined(CONFIG_BLK_DEV_INTEGRITY) |
| 646 | 655 | ||
| 647 | |||
| 648 | |||
| 649 | #define bip_vec_idx(bip, idx) (&(bip->bip_vec[(idx)])) | ||
| 650 | |||
| 651 | #define bip_for_each_vec(bvl, bip, iter) \ | 656 | #define bip_for_each_vec(bvl, bip, iter) \ |
| 652 | for_each_bvec(bvl, (bip)->bip_vec, iter, (bip)->bip_iter) | 657 | for_each_bvec(bvl, (bip)->bip_vec, iter, (bip)->bip_iter) |
| 653 | 658 | ||
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 713f8b62b435..8699bcf5f099 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -512,6 +512,7 @@ struct request_queue { | |||
| 512 | #define QUEUE_FLAG_DEAD 19 /* queue tear-down finished */ | 512 | #define QUEUE_FLAG_DEAD 19 /* queue tear-down finished */ |
| 513 | #define QUEUE_FLAG_INIT_DONE 20 /* queue is initialized */ | 513 | #define QUEUE_FLAG_INIT_DONE 20 /* queue is initialized */ |
| 514 | #define QUEUE_FLAG_NO_SG_MERGE 21 /* don't attempt to merge SG segments*/ | 514 | #define QUEUE_FLAG_NO_SG_MERGE 21 /* don't attempt to merge SG segments*/ |
| 515 | #define QUEUE_FLAG_SG_GAPS 22 /* queue doesn't support SG gaps */ | ||
| 515 | 516 | ||
| 516 | #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ | 517 | #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ |
| 517 | (1 << QUEUE_FLAG_STACKABLE) | \ | 518 | (1 << QUEUE_FLAG_STACKABLE) | \ |
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index e2a6bd7fb133..45a91474487d 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h | |||
| @@ -143,7 +143,7 @@ extern void elv_drain_elevator(struct request_queue *); | |||
| 143 | * io scheduler registration | 143 | * io scheduler registration |
| 144 | */ | 144 | */ |
| 145 | extern void __init load_default_elevator_module(void); | 145 | extern void __init load_default_elevator_module(void); |
| 146 | extern int __init elv_register(struct elevator_type *); | 146 | extern int elv_register(struct elevator_type *); |
| 147 | extern void elv_unregister(struct elevator_type *); | 147 | extern void elv_unregister(struct elevator_type *); |
| 148 | 148 | ||
| 149 | /* | 149 | /* |
diff --git a/include/linux/kernfs.h b/include/linux/kernfs.h index 17aa1cce6f8e..30faf797c2c3 100644 --- a/include/linux/kernfs.h +++ b/include/linux/kernfs.h | |||
| @@ -91,6 +91,7 @@ struct kernfs_elem_attr { | |||
| 91 | const struct kernfs_ops *ops; | 91 | const struct kernfs_ops *ops; |
| 92 | struct kernfs_open_node *open; | 92 | struct kernfs_open_node *open; |
| 93 | loff_t size; | 93 | loff_t size; |
| 94 | struct kernfs_node *notify_next; /* for kernfs_notify() */ | ||
| 94 | }; | 95 | }; |
| 95 | 96 | ||
| 96 | /* | 97 | /* |
| @@ -304,6 +305,7 @@ struct dentry *kernfs_mount_ns(struct file_system_type *fs_type, int flags, | |||
| 304 | struct kernfs_root *root, unsigned long magic, | 305 | struct kernfs_root *root, unsigned long magic, |
| 305 | bool *new_sb_created, const void *ns); | 306 | bool *new_sb_created, const void *ns); |
| 306 | void kernfs_kill_sb(struct super_block *sb); | 307 | void kernfs_kill_sb(struct super_block *sb); |
| 308 | struct super_block *kernfs_pin_sb(struct kernfs_root *root, const void *ns); | ||
| 307 | 309 | ||
| 308 | void kernfs_init(void); | 310 | void kernfs_init(void); |
| 309 | 311 | ||
diff --git a/include/linux/percpu-defs.h b/include/linux/percpu-defs.h index a5fc7d01aad6..dec01d6c3f80 100644 --- a/include/linux/percpu-defs.h +++ b/include/linux/percpu-defs.h | |||
| @@ -146,10 +146,10 @@ | |||
| 146 | * Declaration/definition used for per-CPU variables that must be read mostly. | 146 | * Declaration/definition used for per-CPU variables that must be read mostly. |
| 147 | */ | 147 | */ |
| 148 | #define DECLARE_PER_CPU_READ_MOSTLY(type, name) \ | 148 | #define DECLARE_PER_CPU_READ_MOSTLY(type, name) \ |
| 149 | DECLARE_PER_CPU_SECTION(type, name, "..readmostly") | 149 | DECLARE_PER_CPU_SECTION(type, name, "..read_mostly") |
| 150 | 150 | ||
| 151 | #define DEFINE_PER_CPU_READ_MOSTLY(type, name) \ | 151 | #define DEFINE_PER_CPU_READ_MOSTLY(type, name) \ |
| 152 | DEFINE_PER_CPU_SECTION(type, name, "..readmostly") | 152 | DEFINE_PER_CPU_SECTION(type, name, "..read_mostly") |
| 153 | 153 | ||
| 154 | /* | 154 | /* |
| 155 | * Intermodule exports for per-CPU variables. sparse forgets about | 155 | * Intermodule exports for per-CPU variables. sparse forgets about |
diff --git a/include/linux/phy.h b/include/linux/phy.h index 864ddafad8cc..68041446c450 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h | |||
| @@ -536,6 +536,15 @@ struct phy_driver { | |||
| 536 | /* See set_wol, but for checking whether Wake on LAN is enabled. */ | 536 | /* See set_wol, but for checking whether Wake on LAN is enabled. */ |
| 537 | void (*get_wol)(struct phy_device *dev, struct ethtool_wolinfo *wol); | 537 | void (*get_wol)(struct phy_device *dev, struct ethtool_wolinfo *wol); |
| 538 | 538 | ||
| 539 | /* | ||
| 540 | * Called to inform a PHY device driver when the core is about to | ||
| 541 | * change the link state. This callback is supposed to be used as | ||
| 542 | * fixup hook for drivers that need to take action when the link | ||
| 543 | * state changes. Drivers are by no means allowed to mess with the | ||
| 544 | * PHY device structure in their implementations. | ||
| 545 | */ | ||
| 546 | void (*link_change_notify)(struct phy_device *dev); | ||
| 547 | |||
| 539 | struct device_driver driver; | 548 | struct device_driver driver; |
| 540 | }; | 549 | }; |
| 541 | #define to_phy_driver(d) container_of(d, struct phy_driver, driver) | 550 | #define to_phy_driver(d) container_of(d, struct phy_driver, driver) |
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index 077904c8b70d..cc79eff4a1ad 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
| @@ -334,6 +334,9 @@ static inline void user_single_step_siginfo(struct task_struct *tsk, | |||
| 334 | * calling arch_ptrace_stop() when it would be superfluous. For example, | 334 | * calling arch_ptrace_stop() when it would be superfluous. For example, |
| 335 | * if the thread has not been back to user mode since the last stop, the | 335 | * if the thread has not been back to user mode since the last stop, the |
| 336 | * thread state might indicate that nothing needs to be done. | 336 | * thread state might indicate that nothing needs to be done. |
| 337 | * | ||
| 338 | * This is guaranteed to be invoked once before a task stops for ptrace and | ||
| 339 | * may include arch-specific operations necessary prior to a ptrace stop. | ||
| 337 | */ | 340 | */ |
| 338 | #define arch_ptrace_stop_needed(code, info) (0) | 341 | #define arch_ptrace_stop_needed(code, info) (0) |
| 339 | #endif | 342 | #endif |
diff --git a/include/linux/socket.h b/include/linux/socket.h index 8e98297f1388..ec538fc287a6 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
| @@ -305,8 +305,6 @@ struct ucred { | |||
| 305 | /* IPX options */ | 305 | /* IPX options */ |
| 306 | #define IPX_TYPE 1 | 306 | #define IPX_TYPE 1 |
| 307 | 307 | ||
| 308 | extern int memcpy_fromiovecend(unsigned char *kdata, const struct iovec *iov, | ||
| 309 | int offset, int len); | ||
| 310 | extern int csum_partial_copy_fromiovecend(unsigned char *kdata, | 308 | extern int csum_partial_copy_fromiovecend(unsigned char *kdata, |
| 311 | struct iovec *iov, | 309 | struct iovec *iov, |
| 312 | int offset, | 310 | int offset, |
| @@ -315,8 +313,6 @@ extern unsigned long iov_pages(const struct iovec *iov, int offset, | |||
| 315 | unsigned long nr_segs); | 313 | unsigned long nr_segs); |
| 316 | 314 | ||
| 317 | extern int verify_iovec(struct msghdr *m, struct iovec *iov, struct sockaddr_storage *address, int mode); | 315 | extern int verify_iovec(struct msghdr *m, struct iovec *iov, struct sockaddr_storage *address, int mode); |
| 318 | extern int memcpy_toiovecend(const struct iovec *v, unsigned char *kdata, | ||
| 319 | int offset, int len); | ||
| 320 | extern int move_addr_to_kernel(void __user *uaddr, int ulen, struct sockaddr_storage *kaddr); | 316 | extern int move_addr_to_kernel(void __user *uaddr, int ulen, struct sockaddr_storage *kaddr); |
| 321 | extern int put_cmsg(struct msghdr*, int level, int type, int len, void *data); | 317 | extern int put_cmsg(struct msghdr*, int level, int type, int len, void *data); |
| 322 | 318 | ||
diff --git a/include/linux/uio.h b/include/linux/uio.h index e2231e47cec1..09a7cffc224e 100644 --- a/include/linux/uio.h +++ b/include/linux/uio.h | |||
| @@ -94,8 +94,20 @@ static inline size_t iov_iter_count(struct iov_iter *i) | |||
| 94 | return i->count; | 94 | return i->count; |
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | static inline void iov_iter_truncate(struct iov_iter *i, size_t count) | 97 | /* |
| 98 | * Cap the iov_iter by given limit; note that the second argument is | ||
| 99 | * *not* the new size - it's upper limit for such. Passing it a value | ||
| 100 | * greater than the amount of data in iov_iter is fine - it'll just do | ||
| 101 | * nothing in that case. | ||
| 102 | */ | ||
| 103 | static inline void iov_iter_truncate(struct iov_iter *i, u64 count) | ||
| 98 | { | 104 | { |
| 105 | /* | ||
| 106 | * count doesn't have to fit in size_t - comparison extends both | ||
| 107 | * operands to u64 here and any value that would be truncated by | ||
| 108 | * conversion in assignement is by definition greater than all | ||
| 109 | * values of size_t, including old i->count. | ||
| 110 | */ | ||
| 99 | if (i->count > count) | 111 | if (i->count > count) |
| 100 | i->count = count; | 112 | i->count = count; |
| 101 | } | 113 | } |
| @@ -111,6 +123,9 @@ static inline void iov_iter_reexpand(struct iov_iter *i, size_t count) | |||
| 111 | 123 | ||
| 112 | int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len); | 124 | int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len); |
| 113 | int memcpy_toiovec(struct iovec *iov, unsigned char *kdata, int len); | 125 | int memcpy_toiovec(struct iovec *iov, unsigned char *kdata, int len); |
| 114 | 126 | int memcpy_fromiovecend(unsigned char *kdata, const struct iovec *iov, | |
| 127 | int offset, int len); | ||
| 128 | int memcpy_toiovecend(const struct iovec *v, unsigned char *kdata, | ||
| 129 | int offset, int len); | ||
| 115 | 130 | ||
| 116 | #endif | 131 | #endif |
diff --git a/include/linux/usb_usual.h b/include/linux/usb_usual.h index 1a64b26046ed..9b7de1b46437 100644 --- a/include/linux/usb_usual.h +++ b/include/linux/usb_usual.h | |||
| @@ -70,7 +70,9 @@ | |||
| 70 | US_FLAG(NEEDS_CAP16, 0x00400000) \ | 70 | US_FLAG(NEEDS_CAP16, 0x00400000) \ |
| 71 | /* cannot handle READ_CAPACITY_10 */ \ | 71 | /* cannot handle READ_CAPACITY_10 */ \ |
| 72 | US_FLAG(IGNORE_UAS, 0x00800000) \ | 72 | US_FLAG(IGNORE_UAS, 0x00800000) \ |
| 73 | /* Device advertises UAS but it is broken */ | 73 | /* Device advertises UAS but it is broken */ \ |
| 74 | US_FLAG(BROKEN_FUA, 0x01000000) \ | ||
| 75 | /* Cannot handle FUA in WRITE or READ CDBs */ \ | ||
| 74 | 76 | ||
| 75 | #define US_FLAG(name, value) US_FL_##name = value , | 77 | #define US_FLAG(name, value) US_FL_##name = value , |
| 76 | enum { US_DO_ALL_FLAGS }; | 78 | enum { US_DO_ALL_FLAGS }; |
