Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
[linux-2.6-microblaze.git] / fs / ext4 / namei.c
index 5fa8436..b17a082 100644 (file)
@@ -182,10 +182,6 @@ static struct buffer_head *__ext4_read_dirblock(struct inode *inode,
        return bh;
 }
 
-#ifndef assert
-#define assert(test) J_ASSERT(test)
-#endif
-
 #ifdef DX_DEBUG
 #define dxtrace(command) command
 #else
@@ -843,7 +839,7 @@ dx_probe(struct ext4_filename *fname, struct inode *dir,
                                        break;
                                }
                        }
-                       assert (at == p - 1);
+                       ASSERT(at == p - 1);
                }
 
                at = p - 1;
@@ -1259,8 +1255,8 @@ static void dx_insert_block(struct dx_frame *frame, u32 hash, ext4_lblk_t block)
        struct dx_entry *old = frame->at, *new = old + 1;
        int count = dx_get_count(entries);
 
-       assert(count < dx_get_limit(entries));
-       assert(old < entries + count);
+       ASSERT(count < dx_get_limit(entries));
+       ASSERT(old < entries + count);
        memmove(new + 1, new, (char *)(entries + count) - (char *)(new));
        dx_set_hash(new, hash);
        dx_set_block(new, block);
@@ -1608,6 +1604,7 @@ static struct buffer_head *ext4_lookup_entry(struct inode *dir,
        struct buffer_head *bh;
 
        err = ext4_fname_prepare_lookup(dir, dentry, &fname);
+       generic_set_encrypted_ci_d_ops(dentry);
        if (err == -ENOENT)
                return NULL;
        if (err)
@@ -2958,7 +2955,7 @@ int ext4_orphan_add(handle_t *handle, struct inode *inode)
         * hold i_mutex, or the inode can not be referenced from outside,
         * so i_nlink should not be bumped due to race
         */
-       J_ASSERT((S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
+       ASSERT((S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
                  S_ISLNK(inode->i_mode)) || inode->i_nlink == 0);
 
        BUFFER_TRACE(sbi->s_sbh, "get_write_access");