diff options
Diffstat (limited to 'fs/ecryptfs')
-rw-r--r-- | fs/ecryptfs/main.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c index 812427e6805c..fc4a3a224641 100644 --- a/fs/ecryptfs/main.c +++ b/fs/ecryptfs/main.c | |||
@@ -484,18 +484,12 @@ static int ecryptfs_read_super(struct super_block *sb, const char *dev_name) | |||
484 | struct vfsmount *lower_mnt; | 484 | struct vfsmount *lower_mnt; |
485 | 485 | ||
486 | memset(&nd, 0, sizeof(struct nameidata)); | 486 | memset(&nd, 0, sizeof(struct nameidata)); |
487 | rc = path_lookup(dev_name, LOOKUP_FOLLOW, &nd); | 487 | rc = path_lookup(dev_name, LOOKUP_FOLLOW | LOOKUP_DIRECTORY, &nd); |
488 | if (rc) { | 488 | if (rc) { |
489 | ecryptfs_printk(KERN_WARNING, "path_lookup() failed\n"); | 489 | ecryptfs_printk(KERN_WARNING, "path_lookup() failed\n"); |
490 | goto out; | 490 | goto out; |
491 | } | 491 | } |
492 | lower_root = nd.dentry; | 492 | lower_root = nd.dentry; |
493 | if (!lower_root->d_inode) { | ||
494 | ecryptfs_printk(KERN_WARNING, | ||
495 | "No directory to interpose on\n"); | ||
496 | rc = -ENOENT; | ||
497 | goto out_free; | ||
498 | } | ||
499 | lower_mnt = nd.mnt; | 493 | lower_mnt = nd.mnt; |
500 | ecryptfs_set_superblock_lower(sb, lower_root->d_sb); | 494 | ecryptfs_set_superblock_lower(sb, lower_root->d_sb); |
501 | sb->s_maxbytes = lower_root->d_sb->s_maxbytes; | 495 | sb->s_maxbytes = lower_root->d_sb->s_maxbytes; |