diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/cifsfs.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 9a6696a5eb78..35f9154615fa 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -554,7 +554,7 @@ cifs_get_root(struct smb_vol *vol, struct super_block *sb) | |||
554 | full_path = cifs_build_path_to_root(vol, cifs_sb, | 554 | full_path = cifs_build_path_to_root(vol, cifs_sb, |
555 | cifs_sb_master_tcon(cifs_sb)); | 555 | cifs_sb_master_tcon(cifs_sb)); |
556 | if (full_path == NULL) | 556 | if (full_path == NULL) |
557 | return NULL; | 557 | return ERR_PTR(-ENOMEM); |
558 | 558 | ||
559 | cFYI(1, "Get root dentry for %s", full_path); | 559 | cFYI(1, "Get root dentry for %s", full_path); |
560 | 560 | ||
@@ -583,7 +583,7 @@ cifs_get_root(struct smb_vol *vol, struct super_block *sb) | |||
583 | dchild = d_alloc(dparent, &name); | 583 | dchild = d_alloc(dparent, &name); |
584 | if (dchild == NULL) { | 584 | if (dchild == NULL) { |
585 | dput(dparent); | 585 | dput(dparent); |
586 | dparent = NULL; | 586 | dparent = ERR_PTR(-ENOMEM); |
587 | goto out; | 587 | goto out; |
588 | } | 588 | } |
589 | } | 589 | } |
@@ -601,7 +601,7 @@ cifs_get_root(struct smb_vol *vol, struct super_block *sb) | |||
601 | if (rc) { | 601 | if (rc) { |
602 | dput(dchild); | 602 | dput(dchild); |
603 | dput(dparent); | 603 | dput(dparent); |
604 | dparent = NULL; | 604 | dparent = ERR_PTR(rc); |
605 | goto out; | 605 | goto out; |
606 | } | 606 | } |
607 | alias = d_materialise_unique(dchild, inode); | 607 | alias = d_materialise_unique(dchild, inode); |
@@ -609,7 +609,7 @@ cifs_get_root(struct smb_vol *vol, struct super_block *sb) | |||
609 | dput(dchild); | 609 | dput(dchild); |
610 | if (IS_ERR(alias)) { | 610 | if (IS_ERR(alias)) { |
611 | dput(dparent); | 611 | dput(dparent); |
612 | dparent = NULL; | 612 | dparent = ERR_PTR(-EINVAL); /* XXX */ |
613 | goto out; | 613 | goto out; |
614 | } | 614 | } |
615 | dchild = alias; | 615 | dchild = alias; |
@@ -704,10 +704,8 @@ cifs_do_mount(struct file_system_type *fs_type, | |||
704 | } | 704 | } |
705 | 705 | ||
706 | root = cifs_get_root(volume_info, sb); | 706 | root = cifs_get_root(volume_info, sb); |
707 | if (root == NULL) { | 707 | if (IS_ERR(root)) |
708 | root = ERR_PTR(-EINVAL); /* XXX */ | ||
709 | goto out_super; | 708 | goto out_super; |
710 | } | ||
711 | 709 | ||
712 | cFYI(1, "dentry root is: %p", root); | 710 | cFYI(1, "dentry root is: %p", root); |
713 | goto out; | 711 | goto out; |