Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Jan 2005 09:59:13 +0000
From:      Peter Edwards <peadar.edwards@gmail.com>
To:        "takawata@jp.freebsd.org" <takawata@jp.freebsd.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Cannot cp(1) file from smbfs.(MMAP problem)
Message-ID:  <34cb7c84050128015949559371@mail.gmail.com>
In-Reply-To: <200501280629.PAA20868@axe-inc.co.jp>
References:  <200501280629.PAA20868@axe-inc.co.jp>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On Fri, 28 Jan 2005 15:29:03 +0900, takawata@jp.freebsd.org
<takawata@jp.freebsd.org> wrote:
> Hi, I have problem when try to copy file by cp(1).
> 
> When /mnt is smbfs,
> % cp /mnt/foo.txt /tmp
> will produce
> cp: /mnt/foo.txt: Invalid argument
> 

Does the attached band-aid fix the issue?

[-- Attachment #2 --]
Index: sys/fs/smbfs/smbfs_vnops.c
===================================================================
RCS file: /home/ncvs/src/sys/fs/smbfs/smbfs_vnops.c,v
retrieving revision 1.53
diff -u -r1.53 smbfs_vnops.c
--- sys/fs/smbfs/smbfs_vnops.c	14 Jan 2005 08:52:55 -0000	1.53
+++ sys/fs/smbfs/smbfs_vnops.c	28 Jan 2005 09:57:07 -0000
@@ -212,8 +212,10 @@
 			error = smbfs_smb_open(np, accmode, &scred);
 		}
 	}
-	if (error == 0)
+	if (error == 0) {
+		vnode_create_vobject(vp, 0, ap->a_td);
 		np->n_flag |= NOPEN;
+	}
 	smbfs_attr_cacheremove(vp);
 	return error;
 }

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?34cb7c84050128015949559371>