- if (take_locks) {
- if (create)
- IWRITE_LOCK(ip);
- else
- IREAD_LOCK(ip);
- }
-
- /*
- * A directory's "data" is the inode index table, but i_size is the
- * size of the d-tree, so don't check the offset against i_size
- */
- if (S_ISDIR(ip->i_mode))
- no_size_check = 1;
-
- if ((no_size_check ||
- ((lblock64 << ip->i_sb->s_blocksize_bits) < ip->i_size)) &&
- (xtLookup(ip, lblock64, max_blocks, &xflag, &xaddr, &xlen, no_size_check)
- == 0) && xlen) {
+ if (create)
+ IWRITE_LOCK(ip);
+ else
+ IREAD_LOCK(ip);
+
+ if (((lblock64 << ip->i_sb->s_blocksize_bits) < ip->i_size) &&
+ (!xtLookup(ip, lblock64, xlen, &xflag, &xaddr, &xlen, 0)) &&
+ xaddr) {