diff options
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 0c5e1c5b03db..8f3ab56765a5 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -436,6 +436,21 @@ struct block_device { | |||
436 | }; | 436 | }; |
437 | 437 | ||
438 | /* | 438 | /* |
439 | * bdev->bd_mutex nesting subclasses for the lock validator: | ||
440 | * | ||
441 | * 0: normal | ||
442 | * 1: 'whole' | ||
443 | * 2: 'partition' | ||
444 | */ | ||
445 | enum bdev_bd_mutex_lock_class | ||
446 | { | ||
447 | BD_MUTEX_NORMAL, | ||
448 | BD_MUTEX_WHOLE, | ||
449 | BD_MUTEX_PARTITION | ||
450 | }; | ||
451 | |||
452 | |||
453 | /* | ||
439 | * Radix-tree tags, for tagging dirty and writeback pages within the pagecache | 454 | * Radix-tree tags, for tagging dirty and writeback pages within the pagecache |
440 | * radix trees | 455 | * radix trees |
441 | */ | 456 | */ |
@@ -543,6 +558,25 @@ struct inode { | |||
543 | }; | 558 | }; |
544 | 559 | ||
545 | /* | 560 | /* |
561 | * inode->i_mutex nesting subclasses for the lock validator: | ||
562 | * | ||
563 | * 0: the object of the current VFS operation | ||
564 | * 1: parent | ||
565 | * 2: child/target | ||
566 | * 3: quota file | ||
567 | * | ||
568 | * The locking order between these classes is | ||
569 | * parent -> child -> normal -> quota | ||
570 | */ | ||
571 | enum inode_i_mutex_lock_class | ||
572 | { | ||
573 | I_MUTEX_NORMAL, | ||
574 | I_MUTEX_PARENT, | ||
575 | I_MUTEX_CHILD, | ||
576 | I_MUTEX_QUOTA | ||
577 | }; | ||
578 | |||
579 | /* | ||
546 | * NOTE: in a 32bit arch with a preemptable kernel and | 580 | * NOTE: in a 32bit arch with a preemptable kernel and |
547 | * an UP compile the i_size_read/write must be atomic | 581 | * an UP compile the i_size_read/write must be atomic |
548 | * with respect to the local cpu (unlike with preempt disabled), | 582 | * with respect to the local cpu (unlike with preempt disabled), |
@@ -1276,6 +1310,8 @@ struct file_system_type { | |||
1276 | struct module *owner; | 1310 | struct module *owner; |
1277 | struct file_system_type * next; | 1311 | struct file_system_type * next; |
1278 | struct list_head fs_supers; | 1312 | struct list_head fs_supers; |
1313 | struct lock_class_key s_lock_key; | ||
1314 | struct lock_class_key s_umount_key; | ||
1279 | }; | 1315 | }; |
1280 | 1316 | ||
1281 | extern int get_sb_bdev(struct file_system_type *fs_type, | 1317 | extern int get_sb_bdev(struct file_system_type *fs_type, |
@@ -1407,6 +1443,7 @@ extern void bd_set_size(struct block_device *, loff_t size); | |||
1407 | extern void bd_forget(struct inode *inode); | 1443 | extern void bd_forget(struct inode *inode); |
1408 | extern void bdput(struct block_device *); | 1444 | extern void bdput(struct block_device *); |
1409 | extern struct block_device *open_by_devnum(dev_t, unsigned); | 1445 | extern struct block_device *open_by_devnum(dev_t, unsigned); |
1446 | extern struct block_device *open_partition_by_devnum(dev_t, unsigned); | ||
1410 | extern const struct file_operations def_blk_fops; | 1447 | extern const struct file_operations def_blk_fops; |
1411 | extern const struct address_space_operations def_blk_aops; | 1448 | extern const struct address_space_operations def_blk_aops; |
1412 | extern const struct file_operations def_chr_fops; | 1449 | extern const struct file_operations def_chr_fops; |
@@ -1417,6 +1454,7 @@ extern int blkdev_ioctl(struct inode *, struct file *, unsigned, unsigned long); | |||
1417 | extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long); | 1454 | extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long); |
1418 | extern int blkdev_get(struct block_device *, mode_t, unsigned); | 1455 | extern int blkdev_get(struct block_device *, mode_t, unsigned); |
1419 | extern int blkdev_put(struct block_device *); | 1456 | extern int blkdev_put(struct block_device *); |
1457 | extern int blkdev_put_partition(struct block_device *); | ||
1420 | extern int bd_claim(struct block_device *, void *); | 1458 | extern int bd_claim(struct block_device *, void *); |
1421 | extern void bd_release(struct block_device *); | 1459 | extern void bd_release(struct block_device *); |
1422 | #ifdef CONFIG_SYSFS | 1460 | #ifdef CONFIG_SYSFS |