• I
    [PATCH] lockdep: annotate blkdev nesting · 663d440e
    Ingo Molnar 提交于
    Teach special (recursive) locking code to the lock validator.
    
    Effects on non-lockdep kernels:
    
    - the introduction of the following function variants:
    
      extern struct block_device *open_partition_by_devnum(dev_t, unsigned);
    
      extern int blkdev_put_partition(struct block_device *);
    
      static int
      blkdev_get_whole(struct block_device *bdev, mode_t mode, unsigned flags);
    
     which on non-lockdep are the same as open_by_devnum(), blkdev_put()
     and blkdev_get().
    
    - a subclass parameter to do_open(). [unused on non-lockdep]
    
    - a subclass parameter to __blkdev_put(), which is a new internal
      function for the main blkdev_put*() functions. [parameter unused
      on non-lockdep kernels, except for two sanity check WARN_ON()s]
    
    these functions carry no semantical difference - they only express
    object dependencies towards the lockdep subsystem.
    Signed-off-by: NIngo Molnar <mingo@elte.hu>
    Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
    Cc: Neil Brown <neilb@cse.unsw.edu.au>
    Signed-off-by: NAndrew Morton <akpm@osdl.org>
    Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
    663d440e
block_dev.c 31.3 KB