From 394569928e2f17dff4ae367ac700048138e318c7 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Sat, 23 Apr 2016 04:02:05 -0300 Subject: Linux-libre 4.5.2-gnu --- fs/ext4/ext4.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'fs/ext4/ext4.h') diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 157b458a6..b213449a5 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -899,6 +899,29 @@ do { \ #include "extents_status.h" +/* + * Lock subclasses for i_data_sem in the ext4_inode_info structure. + * + * These are needed to avoid lockdep false positives when we need to + * allocate blocks to the quota inode during ext4_map_blocks(), while + * holding i_data_sem for a normal (non-quota) inode. Since we don't + * do quota tracking for the quota inode, this avoids deadlock (as + * well as infinite recursion, since it isn't turtles all the way + * down...) + * + * I_DATA_SEM_NORMAL - Used for most inodes + * I_DATA_SEM_OTHER - Used by move_inode.c for the second normal inode + * where the second inode has larger inode number + * than the first + * I_DATA_SEM_QUOTA - Used for quota inodes only + */ +enum { + I_DATA_SEM_NORMAL = 0, + I_DATA_SEM_OTHER, + I_DATA_SEM_QUOTA, +}; + + /* * fourth extended file system inode data in memory */ -- cgit v1.2.3-54-g00ecf