>  static void
>  cifs_put_super(struct super_block *sb)
>  {
> +     struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
> +     if (cifs_sb == NULL) {
> +             cFYI(1, "Empty cifs superblock info passed to put_super");
> +             return;
> +     }
> +
> +     bdi_destroy(&cifs_sb->bdi);

This means you have a problem with the lifetime rules in cifs_do_mount.

The VFS only calls ->put_super if sb->s_root is set.  So the rules for
the mount handler are to only set s_root once the superblock is fully
set up.

Also you should never call cifs_umount from the error handling in
cifs_do_mount.  Until s_root is set, please unwind manually, after
that leave it to ->put_super.


> +
> +static void
> +cifs_kill_super(struct super_block *sb)
> +{

This also seems quite broken.  If you fix up the mount path like
I suggested it won't be nessecary.

>       int rc = 0;
>       struct cifs_sb_info *cifs_sb;
>  
>       cFYI(1, "In cifs_put_super");
>       cifs_sb = CIFS_SB(sb);
>       if (cifs_sb == NULL) {

And this check should also be removed.

--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to