[linux-cifs-client] ACPI suspend and cifs mounted filesystem

Dave Kleikamp shaggy at austin.ibm.com
Tue May 16 18:34:20 GMT 2006


On Mon, 2006-05-15 at 11:50 -0700, Osho GG wrote:
> On 5/15/06, Dave Kleikamp <shaggy at austin.ibm.com> wrote:
> > On Sat, 2006-05-13 at 14:30 -0700, Osho GG wrote:
> > > Hi,
> > >
> > > Is there a known issue with cifs mounted filesystem and ACPI suspend
> > > to ram (S3). I noticed that if I have a cifs mounted then my laptop
> > > hard locks when I try to do ACPI suspend to ram. If i unmount it
> > > before I suspend, it works fine.

> 
> Hmm.. I am seeing this in 2.6.16.13.
> 
> % uname -a
> Linux pxpl2885 2.6.16.13-20060503152510-default #1 Thu May 4 15:40:01
> PDT 2006 i686 i686 i386 GNU/Linux
> 
> This is SuSE's kernel-of-the-day compiled and installed from the sources.

I wasn't able to reproduce a hard hang, but I was able to get an oops if
I suspended the machine during a copy to the cifs mount.  (I used a
newer version of SuSE's kernel-of-the-day.)  This led to some things
hanging, including a "sync".  I also got I/O errors when trying to
access the mount afterwards (even when I didn't see the oops), and had
to unmount and remount in order to access the filesystem.

This patch fixed the oops.

diff -Nurp linux-2.6.16.16-20060515152207/fs/cifs/file.c linux/fs/cifs/file.c
--- linux-2.6.16.16-20060515152207/fs/cifs/file.c	2006-03-19 23:53:29.000000000 -0600
+++ linux/fs/cifs/file.c	2006-05-16 11:27:42.000000000 -0500
@@ -869,8 +869,10 @@ static ssize_t cifs_write(struct file *f
 					break;
 			}
 			/* BB FIXME We can not sign across two buffers yet */
-			if((pTcon->ses->server->secMode & 
-			 (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) == 0) {
+			if (pTcon->ses->server &&
+			    ((pTcon->ses->server->secMode & 
+				(SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED))
+			     == 0)) {
 				struct kvec iov[2];
 				unsigned int len;
 

> 
> thanks,
> Osho

-- 
David Kleikamp
IBM Linux Technology Center



More information about the linux-cifs-client mailing list