On Fri, Oct 23, 2015 at 01:51:17PM -0400, Kenneth Westerback wrote:
> On 22 October 2015 at 22:02, Serguey Parkhomovsky
> <[email protected]> wrote:
> > Hi Matthieu,
> >
> > It looks like msdosfs_rename doesn't set the directory offset correctly
> > if a file is being renamed in the root directory. The following patch
> > fixes it for me:
> 
> And here! Should be committed shortly, as I saw that NetBSD was doing
> this exact thing.

Yes, I confirm that it also works for me on real hardware in my sabre
lite arm board.

Thanks to both of you.

> 
> .... Ken
> 
> >
> > Index: msdosfs_vnops.c
> > ===================================================================
> > RCS file: /cvs/src/sys/msdosfs/msdosfs_vnops.c,v
> > retrieving revision 1.102
> > diff -u -p -u -r1.102 msdosfs_vnops.c
> > --- msdosfs_vnops.c     23 Oct 2015 10:45:31 -0000      1.102
> > +++ msdosfs_vnops.c     23 Oct 2015 16:07:38 -0000
> > @@ -1187,8 +1187,9 @@ abortit:
> >                                         VOP_UNLOCK(fdvp, 0, p);
> >                                 goto bad;
> >                         }
> > +                       ip->de_diroffset = to_diroffset;
> >                         if (ip->de_dirclust != MSDOSFSROOT)
> > -                               ip->de_diroffset = to_diroffset & 
> > pmp->pm_crbomask;
> > +                               ip->de_diroffset &= pmp->pm_crbomask;
> >                 }
> >                 reinsert(ip);
> >                 if (newparent)
> >

-- 
Matthieu Herrb

Reply via email to