Commit 884e7cce authored by Andreas Dilger's avatar Andreas Dilger Committed by James Morris

[PATCH] 2.5 i_size_high fixup

 this patch is a minor fixup to ext2/inode.c to avoid displaying the
 high 32 bits of the size for anything other than regular files.  For
 sockets, pipes, symlinks, etc it doesn't make sense to have a value
 larger than 2GB, and this has already been fixed in ext3 and e2fsprogs.
parent 97c345f1
......@@ -1105,7 +1105,7 @@ static int ext2_update_inode(struct inode * inode, int do_sync)
raw_inode->i_frag = ei->i_frag_no;
raw_inode->i_fsize = ei->i_frag_size;
raw_inode->i_file_acl = cpu_to_le32(ei->i_file_acl);
if (S_ISDIR(inode->i_mode))
if (!S_ISREG(inode->i_mode))
raw_inode->i_dir_acl = cpu_to_le32(ei->i_dir_acl);
else {
raw_inode->i_size_high = cpu_to_le32(inode->i_size >> 32);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment