All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paulo Alcantara <pc@cjr.nz>
To: Satadru Pramanik <satadru@gmail.com>, linux-cifs@vger.kernel.org
Subject: Re: Failure to access cifs mount of samba share after resume from sleep with 5.17-rc5
Date: Sat, 04 Jun 2022 16:36:27 -0300	[thread overview]
Message-ID: <87k09wz0ec.fsf@cjr.nz> (raw)
In-Reply-To: <CAFrh3J9soC36+BVuwHB=g9z_KB5Og2+p2_W+BBoBOZveErz14w@mail.gmail.com>

Hi Satadru,

Thanks for providing all requested files off-list.  With that, I ended
up with below changes that should fix your issue.  Please let us if it
works.

diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 12c872800326..325423180fd2 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -1086,7 +1086,7 @@ struct file_system_type cifs_fs_type = {
 };
 MODULE_ALIAS_FS("cifs");
 
-static struct file_system_type smb3_fs_type = {
+struct file_system_type smb3_fs_type = {
 	.owner = THIS_MODULE,
 	.name = "smb3",
 	.init_fs_context = smb3_init_fs_context,
diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h
index dd7e070ca243..b17be47a8e59 100644
--- a/fs/cifs/cifsfs.h
+++ b/fs/cifs/cifsfs.h
@@ -38,7 +38,7 @@ static inline unsigned long cifs_get_time(struct dentry *dentry)
 	return (unsigned long) dentry->d_fsdata;
 }
 
-extern struct file_system_type cifs_fs_type;
+extern struct file_system_type cifs_fs_type, smb3_fs_type;
 extern const struct address_space_operations cifs_addr_ops;
 extern const struct address_space_operations cifs_addr_ops_smallbuf;
 
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
index 35962a1a23b9..eeb2a2957a68 100644
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -1211,8 +1211,12 @@ static struct super_block *__cifs_get_super(void (*f)(struct super_block *, void
 		.data = data,
 		.sb = NULL,
 	};
+	struct file_system_type **fs_type = (struct file_system_type *[]) {
+		&cifs_fs_type, &smb3_fs_type, NULL,
+	};
 
-	iterate_supers_type(&cifs_fs_type, f, &sd);
+	for (; *fs_type; fs_type++)
+		iterate_supers_type(*fs_type, f, &sd);
 
 	if (!sd.sb)
 		return ERR_PTR(-EINVAL);

  parent reply	other threads:[~2022-06-04 19:36 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-27  2:36 Failure to access cifs mount of samba share after resume from sleep with 5.17-rc5 Satadru Pramanik
2022-02-27  8:37 ` Thorsten Leemhuis
2022-02-28  2:37   ` Steve French
2022-02-28 14:31     ` Satadru Pramanik
2022-03-01  4:12       ` Satadru Pramanik
2022-03-01 21:16         ` Satadru Pramanik
2022-03-02  7:57           ` Shyam Prasad N
2022-03-02 14:46             ` Satadru Pramanik
2022-03-04  5:49               ` Shyam Prasad N
2022-03-04 13:58                 ` Satadru Pramanik
2022-03-04 14:01                   ` Satadru Pramanik
2022-03-14 13:00                     ` Satadru Pramanik
2022-03-15 13:26                       ` Thorsten Leemhuis
2022-03-15 22:47                         ` Steve French
2022-03-16  2:14                           ` ronnie sahlberg
     [not found]                             ` <CAH2r5ms7XCTnCdW26Zh_ekXqk2bzqm7QxyYRLCDUPrAadqtyTA@mail.gmail.com>
2022-03-16  5:27                               ` ronnie sahlberg
2022-03-16 13:22                                 ` Satadru Pramanik
2022-03-16 17:27                                   ` Satadru Pramanik
2022-03-18 11:05                                     ` Shyam Prasad N
     [not found]                                       ` <CAFrh3J_YJhuTaBcc6durukdHsxQ1HDxRuer0kdD+t3hNvr4YDA@mail.gmail.com>
2022-03-18 14:05                                         ` Shyam Prasad N
2022-04-11 10:29                                           ` Thorsten Leemhuis
     [not found]                                             ` <CAFrh3J8u=iLQMPq6oTqgbLdrsZnMR8V5cmGKuiRoMey_Ch942g@mail.gmail.com>
2022-04-14  3:48                                               ` Shyam Prasad N
2022-04-14 15:14                                                 ` Satadru Pramanik
2022-04-14 15:22                                                   ` Satadru Pramanik
2022-04-14 16:07                                                   ` Steve French
2022-04-15  0:26                                                     ` Satadru Pramanik
2022-04-28 18:24                                                       ` Satadru Pramanik
2022-05-13 14:05                                                         ` Satadru Pramanik
2022-05-13 14:31                                                           ` ronnie sahlberg
     [not found]                                                           ` <CAH2r5muA3aVgotU7-8urEW1b1SfYC_LFsvFC+3LCkeZsbUMGxQ@mail.gmail.com>
2022-05-31 17:50                                                             ` Satadru Pramanik
2022-06-04 19:36 ` Paulo Alcantara [this message]
2022-06-05  2:31   ` Satadru Pramanik
2022-06-05 11:01     ` Satadru Pramanik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k09wz0ec.fsf@cjr.nz \
    --to=pc@cjr.nz \
    --cc=linux-cifs@vger.kernel.org \
    --cc=satadru@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.