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
------=_Part_4_12455222.1106906353000
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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?

------=_Part_4_12455222.1106906353000
Content-Type: text/plain; name="smb.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="smb.txt"

Index: sys/fs/smbfs/smbfs_vnops.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
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=0914 Jan 2005 08:52:55 -0000=091.53
+++ sys/fs/smbfs/smbfs_vnops.c=0928 Jan 2005 09:57:07 -0000
@@ -212,8 +212,10 @@
 =09=09=09error =3D smbfs_smb_open(np, accmode, &scred);
 =09=09}
 =09}
-=09if (error =3D=3D 0)
+=09if (error =3D=3D 0) {
+=09=09vnode_create_vobject(vp, 0, ap->a_td);
 =09=09np->n_flag |=3D NOPEN;
+=09}
 =09smbfs_attr_cacheremove(vp);
 =09return error;
 }

------=_Part_4_12455222.1106906353000--



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