eCryptfs: Handle failed metadata read in lookup
[linux-flexiantxendom0-natty.git] / fs / ecryptfs / file.c
index 7d1050e..d30aac2 100644 (file)
@@ -211,7 +211,8 @@ static int ecryptfs_open(struct inode *inode, struct file *file)
        if (S_ISDIR(ecryptfs_dentry->d_inode->i_mode)) {
                ecryptfs_printk(KERN_DEBUG, "This is a directory\n");
                mutex_lock(&crypt_stat->cs_mutex);
-               crypt_stat->flags &= ~(ECRYPTFS_ENCRYPTED);
+               crypt_stat->flags &= ~(ECRYPTFS_I_SIZE_INITIALIZED
+                                       | ECRYPTFS_ENCRYPTED);
                mutex_unlock(&crypt_stat->cs_mutex);
                rc = 0;
                goto out;