linux/fs/udf
Jan Kara 4ea7772f82 udf: Fix lockdep warning from udf_symlink()
Lockdep is complaining about UDF:
=============================================
[ INFO: possible recursive locking detected ]
3.12.0+ #16 Not tainted
---------------------------------------------
ln/7386 is trying to acquire lock:
 (&ei->i_data_sem){+.+...}, at: [<ffffffff8142f06d>] udf_get_block+0x8d/0x130

but task is already holding lock:
 (&ei->i_data_sem){+.+...}, at: [<ffffffff81431a8d>] udf_symlink+0x8d/0x690

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&ei->i_data_sem);
  lock(&ei->i_data_sem);

 *** DEADLOCK ***

This is because we hold i_data_sem of the symlink inode while calling
udf_add_entry() for the directory. I don't think this can ever lead to
deadlocks since we never hold i_data_sem for two inodes in any other
place.

The fix is simple - move unlock of i_data_sem for symlink inode up. We
don't need it for anything when linking symlink inode to directory.

Reported-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Jan Kara <jack@suse.cz>
2013-12-23 22:02:16 +01:00
..
balloc.c
dir.c [readdir] convert udf 2013-06-29 12:46:50 +04:00
directory.c
ecma_167.h
file.c aio: Kill aio_rw_vect_retry() 2013-07-30 11:53:12 -04:00
ialloc.c udf: Fortify LVID loading 2013-09-24 11:23:33 +02:00
inode.c truncate: drop 'oldsize' truncate_pagecache() parameter 2013-09-12 15:38:02 -07:00
Kconfig
lowlevel.c
Makefile
misc.c
namei.c udf: Fix lockdep warning from udf_symlink() 2013-12-23 22:02:16 +01:00
osta_udf.h
partition.c
super.c udf: fix for pathetic mount times in case of invalid file system 2013-10-18 22:39:07 +02:00
symlink.c
truncate.c
udf_i.h
udf_sb.h udf: Fortify LVID loading 2013-09-24 11:23:33 +02:00
udfdecl.h
udfend.h
udftime.c
unicode.c