[linux-cifs-client] [RFC] [PATCH] On cifs mount failure getting root inode - need to disconnect share and server session

Steve French smfrench at gmail.com
Mon Aug 11 20:11:03 GMT 2008


When cifs mount succeeds in connecting to the server, but fails to get
the root inode, although it returns an error to mount, it does not
free the tree connection.   This patch fixes that (I noticed this in
testing IPC$ support, ie network named pipe support - since
QueryPathInfo on a pipe over cifs returns an error).

diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index e8da4ee..e83bbd9 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -174,6 +174,7 @@ out_no_root:
        cERROR(1, ("cifs_read_super: get root inode failed"));
        if (inode)
                iput(inode);
+       cifs_umount(sb, cifs_sb);

 out_mount_failed:
        if (cifs_sb) {


-- 
Thanks,

Steve


More information about the linux-cifs-client mailing list