[PATCH] Decrease filp size by 8

From: Kurt Garloff
Date: Sat May 22 2004 - 09:12:42 EST


Hi Andrew,

attached patch decreases the size of struct file by 8 bytes on 64 bit
arches by avoiding unecessary padding.

Regards,
--
Kurt Garloff <garloff@xxxxxxx> Cologne, DE
SUSE LINUX AG / Novell, Nuernberg, DE Director SUSE Labs
diff -uNrp linux-2.6.5/include/linux/fs.h linux-2.6.5.smallstruct/include/linux/fs.h
--- linux-2.6.5/include/linux/fs.h 2004-05-22 13:11:08.000000000 +0200
+++ linux-2.6.5.smallstruct/include/linux/fs.h 2004-05-22 14:32:55.000000000 +0200
@@ -513,8 +513,8 @@ struct fown_struct {
rwlock_t lock; /* protects pid, uid, euid fields */
int pid; /* pid or -pgrp where SIGIO should be sent */
uid_t uid, euid; /* uid/euid of process setting the owner */
- int signum; /* posix.1b rt signal to be delivered on IO */
void *security;
+ int signum; /* posix.1b rt signal to be delivered on IO */
};

/*
@@ -542,10 +542,10 @@ struct file {
atomic_t f_count;
unsigned int f_flags;
mode_t f_mode;
+ int f_error;
loff_t f_pos;
struct fown_struct f_owner;
unsigned int f_uid, f_gid;
- int f_error;
struct file_ra_state f_ra;

unsigned long f_version;

Attachment: pgp00000.pgp
Description: PGP signature