]> git.hungrycats.org Git - linux/commitdiff
[PATCH] 2.5 i_size_high fixup
authorAndreas Dilger <adilger@clusterfs.com>
Mon, 15 Jul 2002 05:54:15 +0000 (22:54 -0700)
committerJames Morris <jmorris@intercode.com.au>
Mon, 15 Jul 2002 05:54:15 +0000 (22:54 -0700)
 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.

fs/ext2/inode.c

index 798875bd134ec77218d14099b91af06ece1ad283..fe9d8033cc1a3ccd72e96b86bbfab4e63089d621 100644 (file)
@@ -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);