inode.c (b22364c8eec89e6b0c081a237f3b6348df87796f) | inode.c (c376222960ae91d5ffb9197ee36771aaed1d9f90) |
---|---|
1/** 2 * eCryptfs: Linux filesystem encryption layer 3 * 4 * Copyright (C) 1997-2004 Erez Zadok 5 * Copyright (C) 2001-2004 Stony Brook University 6 * Copyright (C) 2004-2006 International Business Machines Corp. 7 * Author(s): Michael A. Halcrow <mahalcro@us.ibm.com> 8 * Michael C. Thompsion <mcthomps@us.ibm.com> --- 347 unchanged lines hidden (view full) --- 356 goto out; 357 } 358 if (!nd) { 359 ecryptfs_printk(KERN_DEBUG, "We have a NULL nd, just leave" 360 "as we *think* we are about to unlink\n"); 361 goto out; 362 } 363 /* Released in this function */ | 1/** 2 * eCryptfs: Linux filesystem encryption layer 3 * 4 * Copyright (C) 1997-2004 Erez Zadok 5 * Copyright (C) 2001-2004 Stony Brook University 6 * Copyright (C) 2004-2006 International Business Machines Corp. 7 * Author(s): Michael A. Halcrow <mahalcro@us.ibm.com> 8 * Michael C. Thompsion <mcthomps@us.ibm.com> --- 347 unchanged lines hidden (view full) --- 356 goto out; 357 } 358 if (!nd) { 359 ecryptfs_printk(KERN_DEBUG, "We have a NULL nd, just leave" 360 "as we *think* we are about to unlink\n"); 361 goto out; 362 } 363 /* Released in this function */ |
364 page_virt = 365 (char *)kmem_cache_alloc(ecryptfs_header_cache_2, | 364 page_virt = kmem_cache_zalloc(ecryptfs_header_cache_2, |
366 GFP_USER); 367 if (!page_virt) { 368 rc = -ENOMEM; 369 ecryptfs_printk(KERN_ERR, 370 "Cannot ecryptfs_kmalloc a page\n"); 371 goto out_dput; 372 } | 365 GFP_USER); 366 if (!page_virt) { 367 rc = -ENOMEM; 368 ecryptfs_printk(KERN_ERR, 369 "Cannot ecryptfs_kmalloc a page\n"); 370 goto out_dput; 371 } |
373 memset(page_virt, 0, PAGE_CACHE_SIZE); | 372 |
374 rc = ecryptfs_read_header_region(page_virt, lower_dentry, nd->mnt); 375 crypt_stat = &ecryptfs_inode_to_private(dentry->d_inode)->crypt_stat; 376 if (!ECRYPTFS_CHECK_FLAG(crypt_stat->flags, ECRYPTFS_POLICY_APPLIED)) 377 ecryptfs_set_default_sizes(crypt_stat); 378 if (rc) { 379 rc = 0; 380 ecryptfs_printk(KERN_WARNING, "Error reading header region;" 381 " assuming unencrypted\n"); --- 631 unchanged lines hidden --- | 373 rc = ecryptfs_read_header_region(page_virt, lower_dentry, nd->mnt); 374 crypt_stat = &ecryptfs_inode_to_private(dentry->d_inode)->crypt_stat; 375 if (!ECRYPTFS_CHECK_FLAG(crypt_stat->flags, ECRYPTFS_POLICY_APPLIED)) 376 ecryptfs_set_default_sizes(crypt_stat); 377 if (rc) { 378 rc = 0; 379 ecryptfs_printk(KERN_WARNING, "Error reading header region;" 380 " assuming unencrypted\n"); --- 631 unchanged lines hidden --- |