diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/9p/trans_sock.c | 1 | ||||
-rw-r--r-- | fs/bio.c | 38 | ||||
-rw-r--r-- | fs/compat.c | 2 | ||||
-rw-r--r-- | fs/nfs/callback.c | 3 | ||||
-rw-r--r-- | fs/ntfs/ChangeLog | 2 | ||||
-rw-r--r-- | fs/partitions/check.c | 33 | ||||
-rw-r--r-- | fs/qnx4/bitmap.c | 2 | ||||
-rw-r--r-- | fs/read_write.c | 34 | ||||
-rw-r--r-- | fs/reiserfs/xattr.c | 4 | ||||
-rw-r--r-- | fs/super.c | 15 | ||||
-rw-r--r-- | fs/sysfs/dir.c | 6 | ||||
-rw-r--r-- | fs/udf/balloc.c | 5 | ||||
-rw-r--r-- | fs/udf/crc.c | 5 | ||||
-rw-r--r-- | fs/udf/dir.c | 5 | ||||
-rw-r--r-- | fs/udf/directory.c | 5 | ||||
-rw-r--r-- | fs/udf/file.c | 5 | ||||
-rw-r--r-- | fs/udf/fsync.c | 5 | ||||
-rw-r--r-- | fs/udf/ialloc.c | 5 | ||||
-rw-r--r-- | fs/udf/inode.c | 5 | ||||
-rw-r--r-- | fs/udf/lowlevel.c | 5 | ||||
-rw-r--r-- | fs/udf/misc.c | 5 | ||||
-rw-r--r-- | fs/udf/namei.c | 5 | ||||
-rw-r--r-- | fs/udf/partition.c | 5 | ||||
-rw-r--r-- | fs/udf/super.c | 5 | ||||
-rw-r--r-- | fs/udf/symlink.c | 5 | ||||
-rw-r--r-- | fs/udf/truncate.c | 5 | ||||
-rw-r--r-- | fs/udf/unicode.c | 5 |
27 files changed, 99 insertions, 121 deletions
diff --git a/fs/9p/trans_sock.c b/fs/9p/trans_sock.c index a93c2bf94c33..6a9a75d40f73 100644 --- a/fs/9p/trans_sock.c +++ b/fs/9p/trans_sock.c | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/config.h> | 28 | #include <linux/config.h> |
29 | #include <linux/in.h> | ||
29 | #include <linux/module.h> | 30 | #include <linux/module.h> |
30 | #include <linux/net.h> | 31 | #include <linux/net.h> |
31 | #include <linux/ipv6.h> | 32 | #include <linux/ipv6.h> |
@@ -313,7 +313,8 @@ int bio_get_nr_vecs(struct block_device *bdev) | |||
313 | } | 313 | } |
314 | 314 | ||
315 | static int __bio_add_page(request_queue_t *q, struct bio *bio, struct page | 315 | static int __bio_add_page(request_queue_t *q, struct bio *bio, struct page |
316 | *page, unsigned int len, unsigned int offset) | 316 | *page, unsigned int len, unsigned int offset, |
317 | unsigned short max_sectors) | ||
317 | { | 318 | { |
318 | int retried_segments = 0; | 319 | int retried_segments = 0; |
319 | struct bio_vec *bvec; | 320 | struct bio_vec *bvec; |
@@ -327,7 +328,7 @@ static int __bio_add_page(request_queue_t *q, struct bio *bio, struct page | |||
327 | if (bio->bi_vcnt >= bio->bi_max_vecs) | 328 | if (bio->bi_vcnt >= bio->bi_max_vecs) |
328 | return 0; | 329 | return 0; |
329 | 330 | ||
330 | if (((bio->bi_size + len) >> 9) > q->max_sectors) | 331 | if (((bio->bi_size + len) >> 9) > max_sectors) |
331 | return 0; | 332 | return 0; |
332 | 333 | ||
333 | /* | 334 | /* |
@@ -386,6 +387,25 @@ static int __bio_add_page(request_queue_t *q, struct bio *bio, struct page | |||
386 | } | 387 | } |
387 | 388 | ||
388 | /** | 389 | /** |
390 | * bio_add_pc_page - attempt to add page to bio | ||
391 | * @bio: destination bio | ||
392 | * @page: page to add | ||
393 | * @len: vec entry length | ||
394 | * @offset: vec entry offset | ||
395 | * | ||
396 | * Attempt to add a page to the bio_vec maplist. This can fail for a | ||
397 | * number of reasons, such as the bio being full or target block | ||
398 | * device limitations. The target block device must allow bio's | ||
399 | * smaller than PAGE_SIZE, so it is always possible to add a single | ||
400 | * page to an empty bio. This should only be used by REQ_PC bios. | ||
401 | */ | ||
402 | int bio_add_pc_page(request_queue_t *q, struct bio *bio, struct page *page, | ||
403 | unsigned int len, unsigned int offset) | ||
404 | { | ||
405 | return __bio_add_page(q, bio, page, len, offset, q->max_hw_sectors); | ||
406 | } | ||
407 | |||
408 | /** | ||
389 | * bio_add_page - attempt to add page to bio | 409 | * bio_add_page - attempt to add page to bio |
390 | * @bio: destination bio | 410 | * @bio: destination bio |
391 | * @page: page to add | 411 | * @page: page to add |
@@ -401,8 +421,8 @@ static int __bio_add_page(request_queue_t *q, struct bio *bio, struct page | |||
401 | int bio_add_page(struct bio *bio, struct page *page, unsigned int len, | 421 | int bio_add_page(struct bio *bio, struct page *page, unsigned int len, |
402 | unsigned int offset) | 422 | unsigned int offset) |
403 | { | 423 | { |
404 | return __bio_add_page(bdev_get_queue(bio->bi_bdev), bio, page, | 424 | struct request_queue *q = bdev_get_queue(bio->bi_bdev); |
405 | len, offset); | 425 | return __bio_add_page(q, bio, page, len, offset, q->max_sectors); |
406 | } | 426 | } |
407 | 427 | ||
408 | struct bio_map_data { | 428 | struct bio_map_data { |
@@ -514,7 +534,7 @@ struct bio *bio_copy_user(request_queue_t *q, unsigned long uaddr, | |||
514 | break; | 534 | break; |
515 | } | 535 | } |
516 | 536 | ||
517 | if (__bio_add_page(q, bio, page, bytes, 0) < bytes) { | 537 | if (bio_add_pc_page(q, bio, page, bytes, 0) < bytes) { |
518 | ret = -EINVAL; | 538 | ret = -EINVAL; |
519 | break; | 539 | break; |
520 | } | 540 | } |
@@ -628,7 +648,8 @@ static struct bio *__bio_map_user_iov(request_queue_t *q, | |||
628 | /* | 648 | /* |
629 | * sorry... | 649 | * sorry... |
630 | */ | 650 | */ |
631 | if (__bio_add_page(q, bio, pages[j], bytes, offset) < bytes) | 651 | if (bio_add_pc_page(q, bio, pages[j], bytes, offset) < |
652 | bytes) | ||
632 | break; | 653 | break; |
633 | 654 | ||
634 | len -= bytes; | 655 | len -= bytes; |
@@ -801,8 +822,8 @@ static struct bio *__bio_map_kern(request_queue_t *q, void *data, | |||
801 | if (bytes > len) | 822 | if (bytes > len) |
802 | bytes = len; | 823 | bytes = len; |
803 | 824 | ||
804 | if (__bio_add_page(q, bio, virt_to_page(data), bytes, | 825 | if (bio_add_pc_page(q, bio, virt_to_page(data), bytes, |
805 | offset) < bytes) | 826 | offset) < bytes) |
806 | break; | 827 | break; |
807 | 828 | ||
808 | data += bytes; | 829 | data += bytes; |
@@ -1228,6 +1249,7 @@ EXPORT_SYMBOL(bio_clone); | |||
1228 | EXPORT_SYMBOL(bio_phys_segments); | 1249 | EXPORT_SYMBOL(bio_phys_segments); |
1229 | EXPORT_SYMBOL(bio_hw_segments); | 1250 | EXPORT_SYMBOL(bio_hw_segments); |
1230 | EXPORT_SYMBOL(bio_add_page); | 1251 | EXPORT_SYMBOL(bio_add_page); |
1252 | EXPORT_SYMBOL(bio_add_pc_page); | ||
1231 | EXPORT_SYMBOL(bio_get_nr_vecs); | 1253 | EXPORT_SYMBOL(bio_get_nr_vecs); |
1232 | EXPORT_SYMBOL(bio_map_user); | 1254 | EXPORT_SYMBOL(bio_map_user); |
1233 | EXPORT_SYMBOL(bio_unmap_user); | 1255 | EXPORT_SYMBOL(bio_unmap_user); |
diff --git a/fs/compat.c b/fs/compat.c index 818634120b69..55ac0324aaf1 100644 --- a/fs/compat.c +++ b/fs/compat.c | |||
@@ -1170,7 +1170,7 @@ static ssize_t compat_do_readv_writev(int type, struct file *file, | |||
1170 | } | 1170 | } |
1171 | 1171 | ||
1172 | ret = rw_verify_area(type, file, pos, tot_len); | 1172 | ret = rw_verify_area(type, file, pos, tot_len); |
1173 | if (ret) | 1173 | if (ret < 0) |
1174 | goto out; | 1174 | goto out; |
1175 | 1175 | ||
1176 | fnv = NULL; | 1176 | fnv = NULL; |
diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index f2ca782aba33..30cae3602867 100644 --- a/fs/nfs/callback.c +++ b/fs/nfs/callback.c | |||
@@ -14,6 +14,9 @@ | |||
14 | #include <linux/sunrpc/svc.h> | 14 | #include <linux/sunrpc/svc.h> |
15 | #include <linux/sunrpc/svcsock.h> | 15 | #include <linux/sunrpc/svcsock.h> |
16 | #include <linux/nfs_fs.h> | 16 | #include <linux/nfs_fs.h> |
17 | |||
18 | #include <net/inet_sock.h> | ||
19 | |||
17 | #include "nfs4_fs.h" | 20 | #include "nfs4_fs.h" |
18 | #include "callback.h" | 21 | #include "callback.h" |
19 | 22 | ||
diff --git a/fs/ntfs/ChangeLog b/fs/ntfs/ChangeLog index 50a7749cfca1..02f44094bda9 100644 --- a/fs/ntfs/ChangeLog +++ b/fs/ntfs/ChangeLog | |||
@@ -884,7 +884,7 @@ ToDo/Notes: | |||
884 | 884 | ||
885 | - Add handling for initialized_size != data_size in compressed files. | 885 | - Add handling for initialized_size != data_size in compressed files. |
886 | - Reduce function local stack usage from 0x3d4 bytes to just noise in | 886 | - Reduce function local stack usage from 0x3d4 bytes to just noise in |
887 | fs/ntfs/upcase.c. (Randy Dunlap <rddunlap@osdl.ord>) | 887 | fs/ntfs/upcase.c. (Randy Dunlap <rdunlap@xenotime.net>) |
888 | - Remove compiler warnings for newer gcc. | 888 | - Remove compiler warnings for newer gcc. |
889 | - Pages are no longer kmapped by mm/filemap.c::generic_file_write() | 889 | - Pages are no longer kmapped by mm/filemap.c::generic_file_write() |
890 | around calls to ->{prepare,commit}_write. Adapt NTFS appropriately | 890 | around calls to ->{prepare,commit}_write. Adapt NTFS appropriately |
diff --git a/fs/partitions/check.c b/fs/partitions/check.c index 8dc1822a7022..7881ce05daef 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c | |||
@@ -226,7 +226,7 @@ static struct sysfs_ops part_sysfs_ops = { | |||
226 | static ssize_t part_uevent_store(struct hd_struct * p, | 226 | static ssize_t part_uevent_store(struct hd_struct * p, |
227 | const char *page, size_t count) | 227 | const char *page, size_t count) |
228 | { | 228 | { |
229 | kobject_hotplug(&p->kobj, KOBJ_ADD); | 229 | kobject_uevent(&p->kobj, KOBJ_ADD); |
230 | return count; | 230 | return count; |
231 | } | 231 | } |
232 | static ssize_t part_dev_read(struct hd_struct * p, char *page) | 232 | static ssize_t part_dev_read(struct hd_struct * p, char *page) |
@@ -336,12 +336,31 @@ void add_partition(struct gendisk *disk, int part, sector_t start, sector_t len) | |||
336 | disk->part[part-1] = p; | 336 | disk->part[part-1] = p; |
337 | } | 337 | } |
338 | 338 | ||
339 | static char *make_block_name(struct gendisk *disk) | ||
340 | { | ||
341 | char *name; | ||
342 | static char *block_str = "block:"; | ||
343 | int size; | ||
344 | |||
345 | size = strlen(block_str) + strlen(disk->disk_name) + 1; | ||
346 | name = kmalloc(size, GFP_KERNEL); | ||
347 | if (!name) | ||
348 | return NULL; | ||
349 | strcpy(name, block_str); | ||
350 | strcat(name, disk->disk_name); | ||
351 | return name; | ||
352 | } | ||
353 | |||
339 | static void disk_sysfs_symlinks(struct gendisk *disk) | 354 | static void disk_sysfs_symlinks(struct gendisk *disk) |
340 | { | 355 | { |
341 | struct device *target = get_device(disk->driverfs_dev); | 356 | struct device *target = get_device(disk->driverfs_dev); |
342 | if (target) { | 357 | if (target) { |
358 | char *disk_name = make_block_name(disk); | ||
343 | sysfs_create_link(&disk->kobj,&target->kobj,"device"); | 359 | sysfs_create_link(&disk->kobj,&target->kobj,"device"); |
344 | sysfs_create_link(&target->kobj,&disk->kobj,"block"); | 360 | if (disk_name) { |
361 | sysfs_create_link(&target->kobj,&disk->kobj,disk_name); | ||
362 | kfree(disk_name); | ||
363 | } | ||
345 | } | 364 | } |
346 | } | 365 | } |
347 | 366 | ||
@@ -360,7 +379,7 @@ void register_disk(struct gendisk *disk) | |||
360 | if ((err = kobject_add(&disk->kobj))) | 379 | if ((err = kobject_add(&disk->kobj))) |
361 | return; | 380 | return; |
362 | disk_sysfs_symlinks(disk); | 381 | disk_sysfs_symlinks(disk); |
363 | kobject_hotplug(&disk->kobj, KOBJ_ADD); | 382 | kobject_uevent(&disk->kobj, KOBJ_ADD); |
364 | 383 | ||
365 | /* No minors to use for partitions */ | 384 | /* No minors to use for partitions */ |
366 | if (disk->minors == 1) { | 385 | if (disk->minors == 1) { |
@@ -461,10 +480,14 @@ void del_gendisk(struct gendisk *disk) | |||
461 | devfs_remove_disk(disk); | 480 | devfs_remove_disk(disk); |
462 | 481 | ||
463 | if (disk->driverfs_dev) { | 482 | if (disk->driverfs_dev) { |
483 | char *disk_name = make_block_name(disk); | ||
464 | sysfs_remove_link(&disk->kobj, "device"); | 484 | sysfs_remove_link(&disk->kobj, "device"); |
465 | sysfs_remove_link(&disk->driverfs_dev->kobj, "block"); | 485 | if (disk_name) { |
486 | sysfs_remove_link(&disk->driverfs_dev->kobj, disk_name); | ||
487 | kfree(disk_name); | ||
488 | } | ||
466 | put_device(disk->driverfs_dev); | 489 | put_device(disk->driverfs_dev); |
467 | } | 490 | } |
468 | kobject_hotplug(&disk->kobj, KOBJ_REMOVE); | 491 | kobject_uevent(&disk->kobj, KOBJ_REMOVE); |
469 | kobject_del(&disk->kobj); | 492 | kobject_del(&disk->kobj); |
470 | } | 493 | } |
diff --git a/fs/qnx4/bitmap.c b/fs/qnx4/bitmap.c index 991253927658..46efbf52cbec 100644 --- a/fs/qnx4/bitmap.c +++ b/fs/qnx4/bitmap.c | |||
@@ -23,10 +23,12 @@ | |||
23 | #include <linux/buffer_head.h> | 23 | #include <linux/buffer_head.h> |
24 | #include <linux/bitops.h> | 24 | #include <linux/bitops.h> |
25 | 25 | ||
26 | #if 0 | ||
26 | int qnx4_new_block(struct super_block *sb) | 27 | int qnx4_new_block(struct super_block *sb) |
27 | { | 28 | { |
28 | return 0; | 29 | return 0; |
29 | } | 30 | } |
31 | #endif /* 0 */ | ||
30 | 32 | ||
31 | static void count_bits(register const char *bmPart, register int size, | 33 | static void count_bits(register const char *bmPart, register int size, |
32 | int *const tf) | 34 | int *const tf) |
diff --git a/fs/read_write.c b/fs/read_write.c index a091ee4f430d..df3468a22fea 100644 --- a/fs/read_write.c +++ b/fs/read_write.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/security.h> | 14 | #include <linux/security.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/syscalls.h> | 16 | #include <linux/syscalls.h> |
17 | #include <linux/pagemap.h> | ||
17 | 18 | ||
18 | #include <asm/uaccess.h> | 19 | #include <asm/uaccess.h> |
19 | #include <asm/unistd.h> | 20 | #include <asm/unistd.h> |
@@ -182,22 +183,33 @@ bad: | |||
182 | } | 183 | } |
183 | #endif | 184 | #endif |
184 | 185 | ||
186 | /* | ||
187 | * rw_verify_area doesn't like huge counts. We limit | ||
188 | * them to something that fits in "int" so that others | ||
189 | * won't have to do range checks all the time. | ||
190 | */ | ||
191 | #define MAX_RW_COUNT (INT_MAX & PAGE_CACHE_MASK) | ||
185 | 192 | ||
186 | int rw_verify_area(int read_write, struct file *file, loff_t *ppos, size_t count) | 193 | int rw_verify_area(int read_write, struct file *file, loff_t *ppos, size_t count) |
187 | { | 194 | { |
188 | struct inode *inode; | 195 | struct inode *inode; |
189 | loff_t pos; | 196 | loff_t pos; |
190 | 197 | ||
191 | if (unlikely(count > INT_MAX)) | 198 | if (unlikely((ssize_t) count < 0)) |
192 | goto Einval; | 199 | goto Einval; |
193 | pos = *ppos; | 200 | pos = *ppos; |
194 | if (unlikely((pos < 0) || (loff_t) (pos + count) < 0)) | 201 | if (unlikely((pos < 0) || (loff_t) (pos + count) < 0)) |
195 | goto Einval; | 202 | goto Einval; |
196 | 203 | ||
197 | inode = file->f_dentry->d_inode; | 204 | inode = file->f_dentry->d_inode; |
198 | if (inode->i_flock && MANDATORY_LOCK(inode)) | 205 | if (inode->i_flock && MANDATORY_LOCK(inode)) { |
199 | return locks_mandatory_area(read_write == READ ? FLOCK_VERIFY_READ : FLOCK_VERIFY_WRITE, inode, file, pos, count); | 206 | int retval = locks_mandatory_area( |
200 | return 0; | 207 | read_write == READ ? FLOCK_VERIFY_READ : FLOCK_VERIFY_WRITE, |
208 | inode, file, pos, count); | ||
209 | if (retval < 0) | ||
210 | return retval; | ||
211 | } | ||
212 | return count > MAX_RW_COUNT ? MAX_RW_COUNT : count; | ||
201 | 213 | ||
202 | Einval: | 214 | Einval: |
203 | return -EINVAL; | 215 | return -EINVAL; |
@@ -244,7 +256,8 @@ ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos) | |||
244 | return -EFAULT; | 256 | return -EFAULT; |
245 | 257 | ||
246 | ret = rw_verify_area(READ, file, pos, count); | 258 | ret = rw_verify_area(READ, file, pos, count); |
247 | if (!ret) { | 259 | if (ret >= 0) { |
260 | count = ret; | ||
248 | ret = security_file_permission (file, MAY_READ); | 261 | ret = security_file_permission (file, MAY_READ); |
249 | if (!ret) { | 262 | if (!ret) { |
250 | if (file->f_op->read) | 263 | if (file->f_op->read) |
@@ -295,7 +308,8 @@ ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_ | |||
295 | return -EFAULT; | 308 | return -EFAULT; |
296 | 309 | ||
297 | ret = rw_verify_area(WRITE, file, pos, count); | 310 | ret = rw_verify_area(WRITE, file, pos, count); |
298 | if (!ret) { | 311 | if (ret >= 0) { |
312 | count = ret; | ||
299 | ret = security_file_permission (file, MAY_WRITE); | 313 | ret = security_file_permission (file, MAY_WRITE); |
300 | if (!ret) { | 314 | if (!ret) { |
301 | if (file->f_op->write) | 315 | if (file->f_op->write) |
@@ -497,7 +511,7 @@ static ssize_t do_readv_writev(int type, struct file *file, | |||
497 | } | 511 | } |
498 | 512 | ||
499 | ret = rw_verify_area(type, file, pos, tot_len); | 513 | ret = rw_verify_area(type, file, pos, tot_len); |
500 | if (ret) | 514 | if (ret < 0) |
501 | goto out; | 515 | goto out; |
502 | ret = security_file_permission(file, type == READ ? MAY_READ : MAY_WRITE); | 516 | ret = security_file_permission(file, type == READ ? MAY_READ : MAY_WRITE); |
503 | if (ret) | 517 | if (ret) |
@@ -653,8 +667,9 @@ static ssize_t do_sendfile(int out_fd, int in_fd, loff_t *ppos, | |||
653 | if (!(in_file->f_mode & FMODE_PREAD)) | 667 | if (!(in_file->f_mode & FMODE_PREAD)) |
654 | goto fput_in; | 668 | goto fput_in; |
655 | retval = rw_verify_area(READ, in_file, ppos, count); | 669 | retval = rw_verify_area(READ, in_file, ppos, count); |
656 | if (retval) | 670 | if (retval < 0) |
657 | goto fput_in; | 671 | goto fput_in; |
672 | count = retval; | ||
658 | 673 | ||
659 | retval = security_file_permission (in_file, MAY_READ); | 674 | retval = security_file_permission (in_file, MAY_READ); |
660 | if (retval) | 675 | if (retval) |
@@ -674,8 +689,9 @@ static ssize_t do_sendfile(int out_fd, int in_fd, loff_t *ppos, | |||
674 | goto fput_out; | 689 | goto fput_out; |
675 | out_inode = out_file->f_dentry->d_inode; | 690 | out_inode = out_file->f_dentry->d_inode; |
676 | retval = rw_verify_area(WRITE, out_file, &out_file->f_pos, count); | 691 | retval = rw_verify_area(WRITE, out_file, &out_file->f_pos, count); |
677 | if (retval) | 692 | if (retval < 0) |
678 | goto fput_out; | 693 | goto fput_out; |
694 | count = retval; | ||
679 | 695 | ||
680 | retval = security_file_permission (out_file, MAY_WRITE); | 696 | retval = security_file_permission (out_file, MAY_WRITE); |
681 | if (retval) | 697 | if (retval) |
diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c index 72e120798677..02091eaac0b4 100644 --- a/fs/reiserfs/xattr.c +++ b/fs/reiserfs/xattr.c | |||
@@ -115,8 +115,8 @@ static struct dentry *__get_xa_root(struct super_block *s) | |||
115 | } | 115 | } |
116 | 116 | ||
117 | /* Returns the dentry (or NULL) referring to the root of the extended | 117 | /* Returns the dentry (or NULL) referring to the root of the extended |
118 | * attribute directory tree. If it has already been retreived, it is used. | 118 | * attribute directory tree. If it has already been retrieved, it is used. |
119 | * Otherwise, we attempt to retreive it from disk. It may also return | 119 | * Otherwise, we attempt to retrieve it from disk. It may also return |
120 | * a pointer-encoded error. | 120 | * a pointer-encoded error. |
121 | */ | 121 | */ |
122 | static inline struct dentry *get_xa_root(struct super_block *s) | 122 | static inline struct dentry *get_xa_root(struct super_block *s) |
diff --git a/fs/super.c b/fs/super.c index 6689dded3c84..5a347a4f673a 100644 --- a/fs/super.c +++ b/fs/super.c | |||
@@ -665,16 +665,6 @@ static int test_bdev_super(struct super_block *s, void *data) | |||
665 | return (void *)s->s_bdev == data; | 665 | return (void *)s->s_bdev == data; |
666 | } | 666 | } |
667 | 667 | ||
668 | static void bdev_uevent(struct block_device *bdev, enum kobject_action action) | ||
669 | { | ||
670 | if (bdev->bd_disk) { | ||
671 | if (bdev->bd_part) | ||
672 | kobject_uevent(&bdev->bd_part->kobj, action, NULL); | ||
673 | else | ||
674 | kobject_uevent(&bdev->bd_disk->kobj, action, NULL); | ||
675 | } | ||
676 | } | ||
677 | |||
678 | struct super_block *get_sb_bdev(struct file_system_type *fs_type, | 668 | struct super_block *get_sb_bdev(struct file_system_type *fs_type, |
679 | int flags, const char *dev_name, void *data, | 669 | int flags, const char *dev_name, void *data, |
680 | int (*fill_super)(struct super_block *, void *, int)) | 670 | int (*fill_super)(struct super_block *, void *, int)) |
@@ -717,10 +707,8 @@ struct super_block *get_sb_bdev(struct file_system_type *fs_type, | |||
717 | up_write(&s->s_umount); | 707 | up_write(&s->s_umount); |
718 | deactivate_super(s); | 708 | deactivate_super(s); |
719 | s = ERR_PTR(error); | 709 | s = ERR_PTR(error); |
720 | } else { | 710 | } else |
721 | s->s_flags |= MS_ACTIVE; | 711 | s->s_flags |= MS_ACTIVE; |
722 | bdev_uevent(bdev, KOBJ_MOUNT); | ||
723 | } | ||
724 | } | 712 | } |
725 | 713 | ||
726 | return s; | 714 | return s; |
@@ -736,7 +724,6 @@ void kill_block_super(struct super_block *sb) | |||
736 | { | 724 | { |
737 | struct block_device *bdev = sb->s_bdev; | 725 | struct block_device *bdev = sb->s_bdev; |
738 | 726 | ||
739 | bdev_uevent(bdev, KOBJ_UMOUNT); | ||
740 | generic_shutdown_super(sb); | 727 | generic_shutdown_super(sb); |
741 | sync_blockdev(bdev); | 728 | sync_blockdev(bdev); |
742 | close_bdev_excl(bdev); | 729 | close_bdev_excl(bdev); |
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c index 59734ba1ee60..d36780382176 100644 --- a/fs/sysfs/dir.c +++ b/fs/sysfs/dir.c | |||
@@ -112,7 +112,11 @@ static int create_dir(struct kobject * k, struct dentry * p, | |||
112 | } | 112 | } |
113 | } | 113 | } |
114 | if (error && (error != -EEXIST)) { | 114 | if (error && (error != -EEXIST)) { |
115 | sysfs_put((*d)->d_fsdata); | 115 | struct sysfs_dirent *sd = (*d)->d_fsdata; |
116 | if (sd) { | ||
117 | list_del_init(&sd->s_sibling); | ||
118 | sysfs_put(sd); | ||
119 | } | ||
116 | d_drop(*d); | 120 | d_drop(*d); |
117 | } | 121 | } |
118 | dput(*d); | 122 | dput(*d); |
diff --git a/fs/udf/balloc.c b/fs/udf/balloc.c index b9ded26b10a9..6598a5037ac8 100644 --- a/fs/udf/balloc.c +++ b/fs/udf/balloc.c | |||
@@ -4,11 +4,6 @@ | |||
4 | * PURPOSE | 4 | * PURPOSE |
5 | * Block allocation handling routines for the OSTA-UDF(tm) filesystem. | 5 | * Block allocation handling routines for the OSTA-UDF(tm) filesystem. |
6 | * | 6 | * |
7 | * CONTACTS | ||
8 | * E-mail regarding any portion of the Linux UDF file system should be | ||
9 | * directed to the development team mailing list (run by majordomo): | ||
10 | * linux_udf@hpesjro.fc.hp.com | ||
11 | * | ||
12 | * COPYRIGHT | 7 | * COPYRIGHT |
13 | * This file is distributed under the terms of the GNU General Public | 8 | * This file is distributed under the terms of the GNU General Public |
14 | * License (GPL). Copies of the GPL can be obtained from: | 9 | * License (GPL). Copies of the GPL can be obtained from: |
diff --git a/fs/udf/crc.c b/fs/udf/crc.c index d95c6e38a455..1b82a4adc2f7 100644 --- a/fs/udf/crc.c +++ b/fs/udf/crc.c | |||
@@ -14,11 +14,6 @@ | |||
14 | * | 14 | * |
15 | * AT&T gives permission for the free use of the CRC source code. | 15 | * AT&T gives permission for the free use of the CRC source code. |
16 | * | 16 | * |
17 | * CONTACTS | ||
18 | * E-mail regarding any portion of the Linux UDF file system should be | ||
19 | * directed to the development team mailing list (run by majordomo): | ||
20 | * linux_udf@hpesjro.fc.hp.com | ||
21 | * | ||
22 | * COPYRIGHT | 17 | * COPYRIGHT |
23 | * This file is distributed under the terms of the GNU General Public | 18 | * This file is distributed under the terms of the GNU General Public |
24 | * License (GPL). Copies of the GPL can be obtained from: | 19 | * License (GPL). Copies of the GPL can be obtained from: |
diff --git a/fs/udf/dir.c b/fs/udf/dir.c index 82440b731142..f5222527fe39 100644 --- a/fs/udf/dir.c +++ b/fs/udf/dir.c | |||
@@ -4,11 +4,6 @@ | |||
4 | * PURPOSE | 4 | * PURPOSE |
5 | * Directory handling routines for the OSTA-UDF(tm) filesystem. | 5 | * Directory handling routines for the OSTA-UDF(tm) filesystem. |
6 | * | 6 | * |
7 | * CONTACTS | ||
8 | * E-mail regarding any portion of the Linux UDF file system should be | ||
9 | * directed to the development team mailing list (run by majordomo): | ||
10 | * linux_udf@hpesjro.fc.hp.com | ||
11 | * | ||
12 | * COPYRIGHT | 7 | * COPYRIGHT |
13 | * This file is distributed under the terms of the GNU General Public | 8 | * This file is distributed under the terms of the GNU General Public |
14 | * License (GPL). Copies of the GPL can be obtained from: | 9 | * License (GPL). Copies of the GPL can be obtained from: |
diff --git a/fs/udf/directory.c b/fs/udf/directory.c index 9a61ecc5451b..fe751a2a0e47 100644 --- a/fs/udf/directory.c +++ b/fs/udf/directory.c | |||
@@ -4,11 +4,6 @@ | |||
4 | * PURPOSE | 4 | * PURPOSE |
5 | * Directory related functions | 5 | * Directory related functions |
6 | * | 6 | * |
7 | * CONTACTS | ||
8 | * E-mail regarding any portion of the Linux UDF file system should be | ||
9 | * directed to the development team mailing list (run by majordomo): | ||
10 | * linux_udf@hpesjro.fc.hp.com | ||
11 | * | ||
12 | * COPYRIGHT | 7 | * COPYRIGHT |
13 | * This file is distributed under the terms of the GNU General Public | 8 | * This file is distributed under the terms of the GNU General Public |
14 | * License (GPL). Copies of the GPL can be obtained from: | 9 | * License (GPL). Copies of the GPL can be obtained from: |
diff --git a/fs/udf/file.c b/fs/udf/file.c index 01f520c71dc1..8a388289040d 100644 --- a/fs/udf/file.c +++ b/fs/udf/file.c | |||
@@ -4,11 +4,6 @@ | |||
4 | * PURPOSE | 4 | * PURPOSE |
5 | * File handling routines for the OSTA-UDF(tm) filesystem. | 5 | * File handling routines for the OSTA-UDF(tm) filesystem. |
6 | * | 6 | * |
7 | * CONTACTS | ||
8 | * E-mail regarding any portion of the Linux UDF file system should be | ||
9 | * directed to the development team mailing list (run by majordomo): | ||
10 | * linux_udf@hpesjro.fc.hp.com | ||
11 | * | ||
12 | * COPYRIGHT | 7 | * COPYRIGHT |
13 | * This file is distributed under the terms of the GNU General Public | 8 | * This file is distributed under the terms of the GNU General Public |
14 | * License (GPL). Copies of the GPL can be obtained from: | 9 | * License (GPL). Copies of the GPL can be obtained from: |
diff --git a/fs/udf/fsync.c b/fs/udf/fsync.c index 2dde6b888c2b..5887d78cde43 100644 --- a/fs/udf/fsync.c +++ b/fs/udf/fsync.c | |||
@@ -4,11 +4,6 @@ | |||
4 | * PURPOSE | 4 | * PURPOSE |
5 | * Fsync handling routines for the OSTA-UDF(tm) filesystem. | 5 | * Fsync handling routines for the OSTA-UDF(tm) filesystem. |
6 | * | 6 | * |
7 | * CONTACTS | ||
8 | * E-mail regarding any portion of the Linux UDF file system should be | ||
9 | * directed to the development team mailing list (run by majordomo): | ||
10 | * linux_udf@hpesjro.fc.hp.com | ||
11 | * | ||
12 | * COPYRIGHT | 7 | * COPYRIGHT |
13 | * This file is distributed under the terms of the GNU General Public | 8 | * This file is distributed under the terms of the GNU General Public |
14 | * License (GPL). Copies of the GPL can be obtained from: | 9 | * License (GPL). Copies of the GPL can be obtained from: |
diff --git a/fs/udf/ialloc.c b/fs/udf/ialloc.c index a7e5d40f1ebc..c9b707b470ca 100644 --- a/fs/udf/ialloc.c +++ b/fs/udf/ialloc.c | |||
@@ -4,11 +4,6 @@ | |||
4 | * PURPOSE | 4 | * PURPOSE |
5 | * Inode allocation handling routines for the OSTA-UDF(tm) filesystem. | 5 | * Inode allocation handling routines for the OSTA-UDF(tm) filesystem. |
6 | * | 6 | * |
7 | * CONTACTS | ||
8 | * E-mail regarding any portion of the Linux UDF file system should be | ||
9 | * directed to the development team mailing list (run by majordomo): | ||
10 | * linux_udf@hpesjro.fc.hp.com | ||
11 | * | ||
12 | * COPYRIGHT | 7 | * COPYRIGHT |
13 | * This file is distributed under the terms of the GNU General Public | 8 | * This file is distributed under the terms of the GNU General Public |
14 | * License (GPL). Copies of the GPL can be obtained from: | 9 | * License (GPL). Copies of the GPL can be obtained from: |
diff --git a/fs/udf/inode.c b/fs/udf/inode.c index b83890beaaac..4014f17d382e 100644 --- a/fs/udf/inode.c +++ b/fs/udf/inode.c | |||
@@ -4,11 +4,6 @@ | |||
4 | * PURPOSE | 4 | * PURPOSE |
5 | * Inode handling routines for the OSTA-UDF(tm) filesystem. | 5 | * Inode handling routines for the OSTA-UDF(tm) filesystem. |
6 | * | 6 | * |
7 | * CONTACTS | ||
8 | * E-mail regarding any portion of the Linux UDF file system should be | ||
9 | * directed to the development team mailing list (run by majordomo): | ||
10 | * linux_udf@hpesjro.fc.hp.com | ||
11 | * | ||
12 | * COPYRIGHT | 7 | * COPYRIGHT |
13 | * This file is distributed under the terms of the GNU General Public | 8 | * This file is distributed under the terms of the GNU General Public |
14 | * License (GPL). Copies of the GPL can be obtained from: | 9 | * License (GPL). Copies of the GPL can be obtained from: |
diff --git a/fs/udf/lowlevel.c b/fs/udf/lowlevel.c index 2da5087dfe05..084216107667 100644 --- a/fs/udf/lowlevel.c +++ b/fs/udf/lowlevel.c | |||
@@ -4,11 +4,6 @@ | |||
4 | * PURPOSE | 4 | * PURPOSE |
5 | * Low Level Device Routines for the UDF filesystem | 5 | * Low Level Device Routines for the UDF filesystem |
6 | * | 6 | * |
7 | * CONTACTS | ||
8 | * E-mail regarding any portion of the Linux UDF file system should be | ||
9 | * directed to the development team mailing list (run by majordomo): | ||
10 | * linux_udf@hpesjro.fc.hp.com | ||
11 | * | ||
12 | * COPYRIGHT | 7 | * COPYRIGHT |
13 | * This file is distributed under the terms of the GNU General Public | 8 | * This file is distributed under the terms of the GNU General Public |
14 | * License (GPL). Copies of the GPL can be obtained from: | 9 | * License (GPL). Copies of the GPL can be obtained from: |
diff --git a/fs/udf/misc.c b/fs/udf/misc.c index fd321f9ace83..cc8ca3254db1 100644 --- a/fs/udf/misc.c +++ b/fs/udf/misc.c | |||
@@ -4,11 +4,6 @@ | |||
4 | * PURPOSE | 4 | * PURPOSE |
5 | * Miscellaneous routines for the OSTA-UDF(tm) filesystem. | 5 | * Miscellaneous routines for the OSTA-UDF(tm) filesystem. |
6 | * | 6 | * |
7 | * CONTACTS | ||
8 | * E-mail regarding any portion of the Linux UDF file system should be | ||
9 | * directed to the development team mailing list (run by majordomo): | ||
10 | * linux_udf@hpesjro.fc.hp.com | ||
11 | * | ||
12 | * COPYRIGHT | 7 | * COPYRIGHT |
13 | * This file is distributed under the terms of the GNU General Public | 8 | * This file is distributed under the terms of the GNU General Public |
14 | * License (GPL). Copies of the GPL can be obtained from: | 9 | * License (GPL). Copies of the GPL can be obtained from: |
diff --git a/fs/udf/namei.c b/fs/udf/namei.c index ac191ed7df0a..ca732e79c48b 100644 --- a/fs/udf/namei.c +++ b/fs/udf/namei.c | |||
@@ -4,11 +4,6 @@ | |||
4 | * PURPOSE | 4 | * PURPOSE |
5 | * Inode name handling routines for the OSTA-UDF(tm) filesystem. | 5 | * Inode name handling routines for the OSTA-UDF(tm) filesystem. |
6 | * | 6 | * |
7 | * CONTACTS | ||
8 | * E-mail regarding any portion of the Linux UDF file system should be | ||
9 | * directed to the development team mailing list (run by majordomo): | ||
10 | * linux_udf@hpesjro.fc.hp.com | ||
11 | * | ||
12 | * COPYRIGHT | 7 | * COPYRIGHT |
13 | * This file is distributed under the terms of the GNU General Public | 8 | * This file is distributed under the terms of the GNU General Public |
14 | * License (GPL). Copies of the GPL can be obtained from: | 9 | * License (GPL). Copies of the GPL can be obtained from: |
diff --git a/fs/udf/partition.c b/fs/udf/partition.c index 4d36f264be0d..dabf2b841db8 100644 --- a/fs/udf/partition.c +++ b/fs/udf/partition.c | |||
@@ -4,11 +4,6 @@ | |||
4 | * PURPOSE | 4 | * PURPOSE |
5 | * Partition handling routines for the OSTA-UDF(tm) filesystem. | 5 | * Partition handling routines for the OSTA-UDF(tm) filesystem. |
6 | * | 6 | * |
7 | * CONTACTS | ||
8 | * E-mail regarding any portion of the Linux UDF file system should be | ||
9 | * directed to the development team mailing list (run by majordomo): | ||
10 | * linux_udf@hpesjro.fc.hp.com | ||
11 | * | ||
12 | * COPYRIGHT | 7 | * COPYRIGHT |
13 | * This file is distributed under the terms of the GNU General Public | 8 | * This file is distributed under the terms of the GNU General Public |
14 | * License (GPL). Copies of the GPL can be obtained from: | 9 | * License (GPL). Copies of the GPL can be obtained from: |
diff --git a/fs/udf/super.c b/fs/udf/super.c index 15bd4f24c5b7..4a6f49adc609 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c | |||
@@ -14,11 +14,6 @@ | |||
14 | * http://www.ecma.ch/ | 14 | * http://www.ecma.ch/ |
15 | * http://www.iso.org/ | 15 | * http://www.iso.org/ |
16 | * | 16 | * |
17 | * CONTACTS | ||
18 | * E-mail regarding any portion of the Linux UDF file system should be | ||
19 | * directed to the development team mailing list (run by majordomo): | ||
20 | * linux_udf@hpesjro.fc.hp.com | ||
21 | * | ||
22 | * COPYRIGHT | 17 | * COPYRIGHT |
23 | * This file is distributed under the terms of the GNU General Public | 18 | * This file is distributed under the terms of the GNU General Public |
24 | * License (GPL). Copies of the GPL can be obtained from: | 19 | * License (GPL). Copies of the GPL can be obtained from: |
diff --git a/fs/udf/symlink.c b/fs/udf/symlink.c index 43f3051ef756..674bb40edc83 100644 --- a/fs/udf/symlink.c +++ b/fs/udf/symlink.c | |||
@@ -4,11 +4,6 @@ | |||
4 | * PURPOSE | 4 | * PURPOSE |
5 | * Symlink handling routines for the OSTA-UDF(tm) filesystem. | 5 | * Symlink handling routines for the OSTA-UDF(tm) filesystem. |
6 | * | 6 | * |
7 | * CONTACTS | ||
8 | * E-mail regarding any portion of the Linux UDF file system should be | ||
9 | * directed to the development team mailing list (run by majordomo): | ||
10 | * linux_udf@hpesjro.fc.hp.com | ||
11 | * | ||
12 | * COPYRIGHT | 7 | * COPYRIGHT |
13 | * This file is distributed under the terms of the GNU General Public | 8 | * This file is distributed under the terms of the GNU General Public |
14 | * License (GPL). Copies of the GPL can be obtained from: | 9 | * License (GPL). Copies of the GPL can be obtained from: |
diff --git a/fs/udf/truncate.c b/fs/udf/truncate.c index 7dc8a5572ca1..e1b0e8cfecb4 100644 --- a/fs/udf/truncate.c +++ b/fs/udf/truncate.c | |||
@@ -4,11 +4,6 @@ | |||
4 | * PURPOSE | 4 | * PURPOSE |
5 | * Truncate handling routines for the OSTA-UDF(tm) filesystem. | 5 | * Truncate handling routines for the OSTA-UDF(tm) filesystem. |
6 | * | 6 | * |
7 | * CONTACTS | ||
8 | * E-mail regarding any portion of the Linux UDF file system should be | ||
9 | * directed to the development team mailing list (run by majordomo): | ||
10 | * linux_udf@hpesjro.fc.hp.com | ||
11 | * | ||
12 | * COPYRIGHT | 7 | * COPYRIGHT |
13 | * This file is distributed under the terms of the GNU General Public | 8 | * This file is distributed under the terms of the GNU General Public |
14 | * License (GPL). Copies of the GPL can be obtained from: | 9 | * License (GPL). Copies of the GPL can be obtained from: |
diff --git a/fs/udf/unicode.c b/fs/udf/unicode.c index 5a80efd8debc..706c92e1dcc9 100644 --- a/fs/udf/unicode.c +++ b/fs/udf/unicode.c | |||
@@ -11,11 +11,6 @@ | |||
11 | * UTF-8 is explained in the IETF RFC XXXX. | 11 | * UTF-8 is explained in the IETF RFC XXXX. |
12 | * ftp://ftp.internic.net/rfc/rfcxxxx.txt | 12 | * ftp://ftp.internic.net/rfc/rfcxxxx.txt |
13 | * | 13 | * |
14 | * CONTACTS | ||
15 | * E-mail regarding any portion of the Linux UDF file system should be | ||
16 | * directed to the development team's mailing list (run by majordomo): | ||
17 | * linux_udf@hpesjro.fc.hp.com | ||
18 | * | ||
19 | * COPYRIGHT | 14 | * COPYRIGHT |
20 | * This file is distributed under the terms of the GNU General Public | 15 | * This file is distributed under the terms of the GNU General Public |
21 | * License (GPL). Copies of the GPL can be obtained from: | 16 | * License (GPL). Copies of the GPL can be obtained from: |