xfs: handle missing attribute fork in VerifyForkoff check
For some files, devices, and directories with no xattrs xfs can set di_forkoff to 0, so make it a valid condition check in VerifyForkoff() method Change-Id: I930529ad661c8c5f640c18b2d50dfeddfde5b7d4 Reviewed-on: https://review.haiku-os.org/c/haiku/+/10655 Reviewed-by: Adrien Destugues <[email protected]> Haiku-Format: Haiku-format Bot <[email protected]> Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
committed by
Adrien Destugues
parent
a3da1bbe35
commit
3458bceae0
@@ -154,6 +154,10 @@ Inode::VerifyFork(int whichFork) const
|
||||
bool
|
||||
Inode::VerifyForkoff() const
|
||||
{
|
||||
// Valid case when there is no attribute fork present
|
||||
if (!fNode->di_forkoff)
|
||||
return true;
|
||||
|
||||
switch(Format()) {
|
||||
case XFS_DINODE_FMT_DEV:
|
||||
if (fNode->di_forkoff != (ROUNDUP(sizeof(uint32), 8) >> 3))
|
||||
|
||||
Reference in New Issue
Block a user