diff options
-rw-r--r-- | fs/reiserfs/xattr.c | 2 | ||||
-rw-r--r-- | include/linux/fs.h | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c index 39fedaa88a0c..d935fb9394e3 100644 --- a/fs/reiserfs/xattr.c +++ b/fs/reiserfs/xattr.c | |||
@@ -424,7 +424,7 @@ int xattr_readdir(struct file *file, filldir_t filler, void *buf) | |||
424 | int res = -ENOTDIR; | 424 | int res = -ENOTDIR; |
425 | if (!file->f_op || !file->f_op->readdir) | 425 | if (!file->f_op || !file->f_op->readdir) |
426 | goto out; | 426 | goto out; |
427 | mutex_lock(&inode->i_mutex); | 427 | mutex_lock_nested(&inode->i_mutex, I_MUTEX_XATTR); |
428 | // down(&inode->i_zombie); | 428 | // down(&inode->i_zombie); |
429 | res = -ENOENT; | 429 | res = -ENOENT; |
430 | if (!IS_DEADDIR(inode)) { | 430 | if (!IS_DEADDIR(inode)) { |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 25610205c90d..555bc195c420 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -570,13 +570,14 @@ struct inode { | |||
570 | * 3: quota file | 570 | * 3: quota file |
571 | * | 571 | * |
572 | * The locking order between these classes is | 572 | * The locking order between these classes is |
573 | * parent -> child -> normal -> quota | 573 | * parent -> child -> normal -> xattr -> quota |
574 | */ | 574 | */ |
575 | enum inode_i_mutex_lock_class | 575 | enum inode_i_mutex_lock_class |
576 | { | 576 | { |
577 | I_MUTEX_NORMAL, | 577 | I_MUTEX_NORMAL, |
578 | I_MUTEX_PARENT, | 578 | I_MUTEX_PARENT, |
579 | I_MUTEX_CHILD, | 579 | I_MUTEX_CHILD, |
580 | I_MUTEX_XATTR, | ||
580 | I_MUTEX_QUOTA | 581 | I_MUTEX_QUOTA |
581 | }; | 582 | }; |
582 | 583 | ||