aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/fs.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 4e41a4a331bb..01036262095f 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -639,11 +639,13 @@ static inline int inode_unhashed(struct inode *inode)
639 * 2: child/target 639 * 2: child/target
640 * 3: xattr 640 * 3: xattr
641 * 4: second non-directory 641 * 4: second non-directory
642 * The last is for certain operations (such as rename) which lock two 642 * 5: second parent (when locking independent directories in rename)
643 *
644 * I_MUTEX_NONDIR2 is for certain operations (such as rename) which lock two
643 * non-directories at once. 645 * non-directories at once.
644 * 646 *
645 * The locking order between these classes is 647 * The locking order between these classes is
646 * parent -> child -> normal -> xattr -> second non-directory 648 * parent[2] -> child -> grandchild -> normal -> xattr -> second non-directory
647 */ 649 */
648enum inode_i_mutex_lock_class 650enum inode_i_mutex_lock_class
649{ 651{
@@ -651,7 +653,8 @@ enum inode_i_mutex_lock_class
651 I_MUTEX_PARENT, 653 I_MUTEX_PARENT,
652 I_MUTEX_CHILD, 654 I_MUTEX_CHILD,
653 I_MUTEX_XATTR, 655 I_MUTEX_XATTR,
654 I_MUTEX_NONDIR2 656 I_MUTEX_NONDIR2,
657 I_MUTEX_PARENT2,
655}; 658};
656 659
657void lock_two_nondirectories(struct inode *, struct inode*); 660void lock_two_nondirectories(struct inode *, struct inode*);