ext2: access the parent variable once checked it's non null
* cleanup * add some inode flags we don't use
This commit is contained in:
committed by
Rene Gollent
parent
1a6ebaa02e
commit
28390f6964
@@ -633,6 +633,7 @@ Inode::Create(Transaction& transaction, Inode* parent, const char* name,
|
|||||||
inode->SetAccessTime(×pec);
|
inode->SetAccessTime(×pec);
|
||||||
inode->SetCreationTime(×pec);
|
inode->SetCreationTime(×pec);
|
||||||
inode->SetModificationTime(×pec);
|
inode->SetModificationTime(×pec);
|
||||||
|
if (parent != NULL)
|
||||||
node.SetFlags(parent->Flags() & EXT2_INODE_INHERITED);
|
node.SetFlags(parent->Flags() & EXT2_INODE_INHERITED);
|
||||||
if (volume->HasExtentsFeature()
|
if (volume->HasExtentsFeature()
|
||||||
&& (inode->IsDirectory() || inode->IsFile())) {
|
&& (inode->IsDirectory() || inode->IsFile())) {
|
||||||
@@ -935,4 +936,3 @@ Inode::IncrementNumLinks(Transaction& transaction)
|
|||||||
fVolume->ActivateDirNLink(transaction);
|
fVolume->ActivateDirNLink(transaction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -654,6 +654,10 @@ struct ext2_inode {
|
|||||||
#define EXT2_INODE_DIR_SYNCH 0x00010000
|
#define EXT2_INODE_DIR_SYNCH 0x00010000
|
||||||
#define EXT2_INODE_HUGE_FILE 0x00040000
|
#define EXT2_INODE_HUGE_FILE 0x00040000
|
||||||
#define EXT2_INODE_EXTENTS 0x00080000
|
#define EXT2_INODE_EXTENTS 0x00080000
|
||||||
|
#define EXT2_INODE_LARGE_EA 0x00200000
|
||||||
|
#define EXT2_INODE_EOF_BLOCKS 0x00400000
|
||||||
|
#define EXT2_INODE_INLINE_DATA 0x10000000
|
||||||
|
#define EXT2_INODE_RESERVED 0x80000000
|
||||||
|
|
||||||
#define EXT2_INODE_INHERITED (EXT2_INODE_SECURE_DELETION | EXT2_INODE_UNDELETE \
|
#define EXT2_INODE_INHERITED (EXT2_INODE_SECURE_DELETION | EXT2_INODE_UNDELETE \
|
||||||
| EXT2_INODE_COMPRESSED | EXT2_INODE_SYNCHRONOUS | EXT2_INODE_IMMUTABLE \
|
| EXT2_INODE_COMPRESSED | EXT2_INODE_SYNCHRONOUS | EXT2_INODE_IMMUTABLE \
|
||||||
|
|||||||
Reference in New Issue
Block a user