lkml.org 
[lkml]   [1999]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: nfsv3 & 2.2.9 breaks smbfs (was: Re: smbfs broken in 2.2.9)
On Mon, 7 Jun 1999, Trond Myklebust wrote:

> >>>>> " " == Urban Widmark <urban@svenskatest.se> writes:
>
> > Trond & Steven, I don't have a patch, but here is what I had to
> > change to stop the blocking.
>
> > Change smb_updatepage in fs/smbfs/file.c; add a
> > int result;
> > and change the return from
> > return smb_writepage_sync(dentry, page, offset, count);
> > to
> > result = smb_writepage_sync(dentry, page, offset,
> > count); smb_unlock_page(page); return result;
>
> > to smb_updatepage in fs/smbfs/file.c.
>
> > This also explains why plain 2.2.9 works fine.
>
> Oops. Looks like the call to smb_unlock_page that used to be in
> smb_writepage_sync itself has been removed from the stock kernel since
> last I looked. Your fix is quite correct.

Thanks! This took care of the problem. For the less adventurous, here's
the patch (works against 2.2.9-ac3 also):

--- linux/fs/smbfs/file.c.orig Mon Jun 7 18:42:14 1999
+++ linux/fs/smbfs/file.c Mon Jun 7 18:41:41 1999
@@ -198,6 +198,7 @@
static int
smb_updatepage(struct file *file, struct page *page, const char *buf, unsigned long offset, unsigned int count, int sync)
{
+ int result;
struct dentry *dentry = file->f_dentry;

set_bit(PG_locked, &page->flags);
@@ -212,7 +213,9 @@
return -EFAULT;
}

- return smb_writepage_sync(dentry, page, offset, count);
+ result = smb_writepage_sync(dentry, page, offset, count);
+ smb_unlock_page(page);
+ return result;
}

static ssize_t

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.067 / U:0.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site