inode.c (0a688ad713949643e201431d3f4a4ceddfeb70ca) | inode.c (72b55fffd631a89e5be6fe1b4f2565bc4cd90deb) |
---|---|
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-2007 International Business Machines Corp. 7 * Author(s): Michael A. Halcrow <mahalcro@us.ibm.com> 8 * Michael C. Thompsion <mcthomps@us.ibm.com> --- 294 unchanged lines hidden (view full) --- 303 } 304 ecryptfs_set_dentry_lower(dentry, lower_dentry); 305 ecryptfs_set_dentry_lower_mnt(dentry, lower_mnt); 306 if (!lower_dentry->d_inode) { 307 /* We want to add because we couldn't find in lower */ 308 d_add(dentry, NULL); 309 goto out; 310 } | 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-2007 International Business Machines Corp. 7 * Author(s): Michael A. Halcrow <mahalcro@us.ibm.com> 8 * Michael C. Thompsion <mcthomps@us.ibm.com> --- 294 unchanged lines hidden (view full) --- 303 } 304 ecryptfs_set_dentry_lower(dentry, lower_dentry); 305 ecryptfs_set_dentry_lower_mnt(dentry, lower_mnt); 306 if (!lower_dentry->d_inode) { 307 /* We want to add because we couldn't find in lower */ 308 d_add(dentry, NULL); 309 goto out; 310 } |
311 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb, 1); | 311 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb, 312 ECRYPTFS_INTERPOSE_FLAG_D_ADD); |
312 if (rc) { 313 ecryptfs_printk(KERN_ERR, "Error interposing\n"); 314 goto out_dput; 315 } 316 if (S_ISDIR(lower_inode->i_mode)) { 317 ecryptfs_printk(KERN_DEBUG, "Is a directory; returning\n"); 318 goto out; 319 } --- 212 unchanged lines hidden (view full) --- 532 struct dentry *lower_dentry; 533 struct dentry *lower_dir_dentry; 534 535 lower_dentry = ecryptfs_dentry_to_lower(dentry); 536 lower_dir_dentry = lock_parent(lower_dentry); 537 rc = vfs_mknod(lower_dir_dentry->d_inode, lower_dentry, mode, dev); 538 if (rc || !lower_dentry->d_inode) 539 goto out; | 313 if (rc) { 314 ecryptfs_printk(KERN_ERR, "Error interposing\n"); 315 goto out_dput; 316 } 317 if (S_ISDIR(lower_inode->i_mode)) { 318 ecryptfs_printk(KERN_DEBUG, "Is a directory; returning\n"); 319 goto out; 320 } --- 212 unchanged lines hidden (view full) --- 533 struct dentry *lower_dentry; 534 struct dentry *lower_dir_dentry; 535 536 lower_dentry = ecryptfs_dentry_to_lower(dentry); 537 lower_dir_dentry = lock_parent(lower_dentry); 538 rc = vfs_mknod(lower_dir_dentry->d_inode, lower_dentry, mode, dev); 539 if (rc || !lower_dentry->d_inode) 540 goto out; |
540 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb, 0); | 541 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb, 542 ECRYPTFS_INTERPOSE_FLAG_DELAY_PERSISTENT_FILE); |
541 if (rc) 542 goto out; 543 fsstack_copy_attr_times(dir, lower_dir_dentry->d_inode); 544 fsstack_copy_inode_size(dir, lower_dir_dentry->d_inode); 545out: 546 unlock_dir(lower_dir_dentry); 547 if (!dentry->d_inode) 548 d_drop(dentry); --- 499 unchanged lines hidden --- | 543 if (rc) 544 goto out; 545 fsstack_copy_attr_times(dir, lower_dir_dentry->d_inode); 546 fsstack_copy_inode_size(dir, lower_dir_dentry->d_inode); 547out: 548 unlock_dir(lower_dir_dentry); 549 if (!dentry->d_inode) 550 d_drop(dentry); --- 499 unchanged lines hidden --- |