Fix fs/fat/inode.c when compiled with gcc-3.0.x

Fix fs/fat/inode.c when compiled with gcc-3.0.x

Post by Tom Rin » Sun, 13 Jan 2002 03:20:15

> > This was indeed on PPC (I tried x86 w/ the same package but it worked)
> > running gcc-3.0.3-1 (from Debian/sid).  So it seems the fix didn't make
> > it into a release yet.  I guess I'll go hunt down some compiler people
> > and get them to fix it.

> I've seen the patch, so it definitely is fixed - rth posted it to the gcc
> lists. But it may be that it only went into the development tree, or that
> it happened after 3.0.3 was released.

After talking with Franz Sirl abit (and reading the thread on the
patch), the fix is in the gcc-3.1 branch (so gcc-3.1.0 will work), and
the patch can be applied to 3.0.x (I've done it locally and am
rebuilding).  He's going to try and get the patch applied to the 3.0.x
branch, but isn't sure if there will be another 3.0.x release with 3.1
coming out on april 15 (if on schedule).

So should we workaround this now in 2.4.x or no?  There's other changes
which need to get into 2.4.x / 2.5.x anyhow for gcc-3.0.x to be happy on
all PPC arches anyhow.  But I also get the feeling 2.4.x and gcc-3.1
will be unsupported/not a good idea for a while to come anyhow.

Tom Rini (TR1265)
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at
Please read the FAQ at


Fix fs/fat/inode.c when compiled with gcc-3.0.x

Post by Richard Henderso » Sun, 13 Jan 2002 07:30:17

> It is, but there was a bug in the PPC machine description in 3.0.x
> (x=0,1), or something. It's supposedly fixed in later gcc's.

Apparently I only committed the patch to mainline.  Oops.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at
Please read the FAQ at


1. fs/inode.c sync fix and fs/ext2/inode.c tidy

These patches can be pulled from bk://
First one: in fs/ext2/inode.c merge ext2_fsync_inode into ext2_sync_file
as that's the only place it can be called from.

Second one only touches fs/inode.c:sync_one to replace the if I_LOCK
check with a while.  Basically, the inode sync could end up deferring
to writeback if the inode is already locked.  This breaks things like
O_SYNC which assume the inode sync is synchronous and only returns
when the data is safely on disk.  This patch will need to go into 2.4
after a bit of testing for unexpected interactions.

Patches are included below for reading.

"A man with a bass just walked in,
 and he's putting it down
 on the floor."

diff -Nru a/fs/ext2/ext2.h b/fs/ext2/ext2.h
--- a/fs/ext2/ext2.h    Thu Mar  7 16:02:59 2002

 /* fsync.c */
 extern int ext2_sync_file (struct file *, struct dentry *, int);
-extern int ext2_fsync_inode (struct inode *, int);

 /* ialloc.c */
 extern struct inode * ext2_new_inode (struct inode *, int);
diff -Nru a/fs/ext2/fsync.c b/fs/ext2/fsync.c
--- a/fs/ext2/fsync.c   Thu Mar  7 16:02:59 2002

 int ext2_sync_file(struct file * file, struct dentry *dentry, int datasync)
        struct inode *inode = dentry->d_inode;
-       return ext2_fsync_inode(inode, datasync);
-int ext2_fsync_inode(struct inode *inode, int datasync)
        int err;

        err  = fsync_inode_buffers(inode);

diff -Nru a/fs/inode.c b/fs/inode.c
--- a/fs/inode.c        Thu Mar  7 16:02:59 2002

 static inline void sync_one(struct inode *inode, int sync)
-       if (inode->i_state & I_LOCK) {
+       while (inode->i_state & I_LOCK) {
-       } else {
-               __sync_one(inode, sync);
+       __sync_one(inode, sync);

 static inline void sync_list(struct list_head *head)
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at
Please read the FAQ at

2. hfs_fs (Mac filesystem) version 0.8.1

3. Fix compile error in fs/cramfs/inode.c in 2.5.66

4. SysV.4 Streams and Modules programming problem: 1

5. [2.5.4-dj4] cleanup to use strsep for fs/fat/inode.c

6. RAIDframe

7. fat-fs printk arg. fix

8. I wan to know more about AIX 191 Certification

9. DOS FAT FS support in FreeBSD fixed ?

10. Linux 2.5.68 - Fix FreeXid after return in fs/cifs/inode.c

11. HELP PLEASE: can't fix FS (inode count too big)

12. linux-2.5.18: fs/hfs/inode.c: PATCH to fix compilation error

13. Remove compile warning from fs/ncpfs/inode.c