Re: NFSv3 patches break smbfs

Trond Myklebust (trond.myklebust@fys.uio.no)
06 Sep 1999 12:18:05 +0200


Alan Cox <alan@redhat.com> writes:

> > applied. I'm able to copy files to a share mounted from an NT 4.0sp3
> > server, but all processes concerned hang hard when attempting to delete
> > the same file. 'ps' shows them hung in a 'D' state.
> >
> > This happened a few months back with one of your earlier patches, but I
> > don't remember what the fix consisted of.
> >
>
> Add the smbfs patches from a 2.2.11ac release and it should be fine - its
> the page locking changes

Oops. Thanks Alan.

Please apply the following patch (or alternatively do as Alan suggests
and just copy fs/smbfs/file.c over from the ac release).

Cheers,
Trond

--- fs/smbfs/file.c.orig Sat Aug 28 22:15:00 1999
+++ fs/smbfs/file.c Mon Sep 6 12:08:25 1999
@@ -191,6 +191,7 @@
smb_updatepage(struct file *file, struct page *page, const char *buf, unsigned long offset, unsigned int count, int sync)
{
struct dentry *dentry = file->f_dentry;
+ int result = -EFAULT;

set_bit(PG_locked, &page->flags);

@@ -200,11 +201,13 @@

if (copy_from_user((u8*)page_address(page) + offset, buf, count)) {
clear_bit(PG_uptodate, &page->flags);
- smb_unlock_page(page);
- return -EFAULT;
+ goto out;
}

- return smb_writepage_sync(dentry, page, offset, count);
+ result = smb_writepage_sync(dentry, page, offset, count);
+ out:
+ 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/