Lines Matching refs:inode1
1099 * @inode1: first inode to lock
1104 void lock_two_inodes(struct inode *inode1, struct inode *inode2,
1107 if (!inode1 || !inode2) {
1113 if (!inode1)
1114 swap(inode1, inode2);
1122 if (S_ISDIR(inode2->i_mode) == S_ISDIR(inode1->i_mode)) {
1123 if (inode1 > inode2)
1124 swap(inode1, inode2);
1125 } else if (!S_ISDIR(inode1->i_mode))
1126 swap(inode1, inode2);
1128 if (inode1)
1129 inode_lock_nested(inode1, subclass1);
1130 if (inode2 && inode2 != inode1)
1140 * @inode1: first inode to lock
1143 void lock_two_nondirectories(struct inode *inode1, struct inode *inode2)
1145 if (inode1)
1146 WARN_ON_ONCE(S_ISDIR(inode1->i_mode));
1149 lock_two_inodes(inode1, inode2, I_MUTEX_NORMAL, I_MUTEX_NONDIR2);
1155 * @inode1: first inode to unlock
1158 void unlock_two_nondirectories(struct inode *inode1, struct inode *inode2)
1160 if (inode1) {
1161 WARN_ON_ONCE(S_ISDIR(inode1->i_mode));
1162 inode_unlock(inode1);
1164 if (inode2 && inode2 != inode1) {