Re: [PATCH] ext4: Use bitops to read/modify i_flags part2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tytso@xxxxxxx writes:

> On Mon, May 31, 2010 at 12:56:45PM +0400, Dmitry Monakhov wrote:
>> "Theodore Ts'o" <tytso@xxxxxxx> writes:
>> 
>> > From: "Theodore Ts'o" <tytso@xxxxxxx>
>> >
>> > From: Dmitry Monakhov <dmonakhov@xxxxxxxxxx>
>> Bad news. Bug still exist because you've missed several important chunks 
>> (ext4_set_inode_flags, ext4_inode_blocks) while porting original patch.
>> And I've missed this too on review cycle.
>> Please add following patch to patch-queue.
>
> Added to the ext4 patch queue (with minor updates to the commit
> description).
BTW. The patch that i've sent would not compile because of misstype.
So it may looks like that i've sent untested random peace of crap
from a first glance. But the truth is that that misstype was fixed
in to topmost quilt's patch so i've missed it original patch.
And indeed the bug with non-atomic bit's manipulation has gone, at
least i can't reproduce it any more. Incremental fix attached.

diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 7b42cf8..39d1c14 100644
--- b/fs/ext4/inode.c
+++ a/fs/ext4/inode.c
@@ -4943,7 +4943,7 @@
 void ext4_get_inode_flags(struct ext4_inode_info *ei)
 {
 	unsigned int vfs_fl;
-	unsigned long old_flags, new_flags;
+	unsigned long old_fl, new_fl;
 
 	do {
 		vfs_fl = ei->vfs_inode.i_flags;

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux