]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r251561:
authorpfg <pfg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 14 Jun 2013 02:51:03 +0000 (02:51 +0000)
committerpfg <pfg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 14 Jun 2013 02:51:03 +0000 (02:51 +0000)
commit27a1df5efe1ce78a52e71c8994caefa44d5749ad
tree8ff526ffcd0db20452e204805fee953110ff721d
parente07a8cc84b112dafb38a918eaafe3d8583103000
MFC r251561:

libstand: Reset the seek pointer in ext2fs as done in UFS.

Reset the seek pointer to 0 when a file is successfully opened,
since otherwise the initial seek offset will contain the directory
offset of the filesystem block that contained its directory entry.
This bug was mostly harmless because typically the directory is
less than one filesystem block in size so the offset would be zero.
It did however generally break loading a kernel from the (large)
kernel compile directory.

Also reset the seek pointer when a new inode is opened in read_inode(),
though this is not actually necessary now because all callers set
it afterwards.

PR: 177328
Submitted by: Eric van Gyzen
Reviewed by: iedowse

git-svn-id: svn://svn.freebsd.org/base/stable/9@251726 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
lib/libstand/ext2fs.c