Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Sep 2016 12:07:25 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r305597 - head/sys/ufs/ufs
Message-ID:  <201609081207.u88C7Pwp016874@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Thu Sep  8 12:07:25 2016
New Revision: 305597
URL: https://svnweb.freebsd.org/changeset/base/305597

Log:
  When externding directory inode in ufs_direnter(), adjust i_endoff.
  
  This change is formally not needed, since i_endoff not used in all
  code paths after the call to ufs_direnter(), and i_endoff is
  recalculated by the next lookup.  But having the value correct makes
  the reasoning about code simpler.
  
  Reported and tested by:	pho
  Reviewed by:	mckusick
  Sponsored by:	The FreeBSD Foundation
  MFC after:	2 weeks

Modified:
  head/sys/ufs/ufs/ufs_lookup.c

Modified: head/sys/ufs/ufs/ufs_lookup.c
==============================================================================
--- head/sys/ufs/ufs/ufs_lookup.c	Thu Sep  8 12:07:25 2016	(r305596)
+++ head/sys/ufs/ufs/ufs_lookup.c	Thu Sep  8 12:07:25 2016	(r305597)
@@ -908,6 +908,7 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdir
 		}
 		dp->i_size = dp->i_offset + DIRBLKSIZ;
 		DIP_SET(dp, i_size, dp->i_size);
+		dp->i_endoff = dp->i_size;
 		dp->i_flag |= IN_CHANGE | IN_UPDATE;
 		dirp->d_reclen = DIRBLKSIZ;
 		blkoff = dp->i_offset &



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