remove event from affs, ext3, hpfs, ntfs, ufs
Subsystems (5)
RFC PATCH 1/1 remove event from affs, ext3, hpfs, ntfs, ufs
Andrew merged the vfs change needed to get rid of 'event', the attached patch (vs. 2.5.44-mm5) removes 'event' from all filesystems.
The replacement for
inode->i_version = event++;
is
'inode->i_version++;
and
inode->i_version = 0;
in the alloc_inode callback.
Additionally, the patch fixes a merge error in ext2 - one hunk is now in the wrong function.
Maintainers: Can I send the change to Andrew directly or do you want to do that yourself?
--
Manfred
fs/affs/amigaffs.c +2 -2
@@ -69,7 +69,7 @@affs_brelse (dir_bh); dir->i_mtime = dir->i_ctime =CURRENT_TIME ; - dir->i_version = ++event; + dir->i_version++;mark_inode_dirty (dir);return 0 ;
@@ -121,7 +121,7 @@affs_brelse (bh); dir->i_mtime = dir->i_ctime =CURRENT_TIME ; - dir->i_version = ++event; + dir->i_version++;mark_inode_dirty (dir);return retval;
fs/affs/super.c +1 -0
@@ -92,6 +92,7 @@ ei = (struct affs_inode_info *)kmem_cache_alloc (affs_inode_cachep,SLAB_KERNEL );if (!ei)return NULL ; + ei->vfs_inode.i_version =0 ;return &ei->vfs_inode; }
fs/ext2/ialloc.c +0 -1
@@ -598,7 +598,6 @@struct buffer_head *bitmap_bh =NULL ;int i; - inode->i_version =0 ;lock_super (sb); es =EXT2_SB (sb)->s_es;for (i =0 ; i <EXT2_SB (sb)->s_groups_count; i++) {
fs/ext2/inode.c +0 -1
@@ -1015,7 +1015,6 @@ } inode->i_blksize =PAGE_SIZE ;/* This is the optimal IO size (for stat), not the fs block size */ inode->i_blocks =le32_to_cpu (raw_inode->i_blocks); - inode->i_version =0 ; ei->i_flags =le32_to_cpu (raw_inode->i_flags); ei->i_faddr =le32_to_cpu (raw_inode->i_faddr); ei->i_frag_no = raw_inode->i_frag;
fs/ext2/super.c +1 -0
@@ -159,6 +159,7 @@ ei->i_acl =EXT2_ACL_NOT_CACHED ; ei->i_default_acl =EXT2_ACL_NOT_CACHED ;#endif + ei->vfs_inode.i_version =0 ;return &ei->vfs_inode; }
fs/ext3/inode.c +0 -1
@@ -2248,7 +2248,6 @@* (for stat), not the fs block * size */ inode->i_blocks =le32_to_cpu (raw_inode->i_blocks); - inode->i_version = ++event; ei->i_flags =le32_to_cpu (raw_inode->i_flags);#ifdef EXT3_FRAGMENTS ei->i_faddr =le32_to_cpu (raw_inode->i_faddr);
fs/ext3/namei.c +4 -4
@@ -1201,7 +1201,7 @@*/ dir->i_mtime = dir->i_ctime =CURRENT_TIME ;ext3_update_dx_flag (dir); - dir->i_version = ++event; + dir->i_version++;ext3_mark_inode_dirty (handle, dir);BUFFER_TRACE (bh,"call ext3_journal_dirty_metadata" ); err =ext3_journal_dirty_metadata (handle, bh);
@@ -1520,7 +1520,7 @@ le16_to_cpu(de->rec_len)); else de->inode = 0; - dir->i_version = ++event; + dir->i_version++;BUFFER_TRACE (bh,"call ext3_journal_dirty_metadata" );ext3_journal_dirty_metadata (handle, bh);return 0 ;
@@ -1964,7 +1964,7 @@ext3_warning (inode->i_sb,"ext3_rmdir" ,"empty directory has nlink!=2 (%d)" , inode->i_nlink); - inode->i_version = ++event; + inode->i_version++; inode->i_nlink =0 ;/* There's no need to set i_disksize: the fact that i_nlink is * zero will ensure that the right thing happens during any
@@ -2214,7 +2214,7 @@if (EXT3_HAS_INCOMPAT_FEATURE (new_dir->i_sb,EXT3_FEATURE_INCOMPAT_FILETYPE )) new_de->file_type = old_de->file_type; - new_dir->i_version = ++event; + new_dir->i_version++;BUFFER_TRACE (new_bh,"call ext3_journal_dirty_metadata" );ext3_journal_dirty_metadata (handle, new_bh);brelse (new_bh);
fs/ext3/super.c +1 -0
@@ -433,6 +433,7 @@ ei->i_acl =EXT3_ACL_NOT_CACHED ; ei->i_default_acl =EXT3_ACL_NOT_CACHED ;#endif + ei->vfs_inode.i_version =0 ;return &ei->vfs_inode; }
fs/hpfs/dnode.c +2 -2
@@ -403,7 +403,7 @@ c =1 ; goto ret; } - i->i_version = ++event; + i->i_version++; c =hpfs_add_to_dnode (i, dno, name, namelen, new_de,0 ); ret:if (!cdepth)hpfs_unlock_creation (i->i_sb);
@@ -710,7 +710,7 @@return 2 ; } } - i->i_version = ++event; + i->i_version++;for_all_poss (i, hpfs_pos_del, (t =get_pos (dnode, de)) +1 ,1 );hpfs_delete_de (i->i_sb, dnode, de);hpfs_mark_4buffers_dirty (qbh);
fs/hpfs/inode.c +0 -1
@@ -84,7 +84,6 @@ hpfs_inode->i_ea_uid =0 ; hpfs_inode->i_ea_gid =0 ; hpfs_inode->i_ea_size =0 ; - i->i_version = ++event; hpfs_inode->i_rddir_off =NULL ; hpfs_inode->i_dirty =0 ;
fs/hpfs/super.c +1 -0
@@ -166,6 +166,7 @@ ei = (struct hpfs_inode_info *)kmem_cache_alloc (hpfs_inode_cachep,SLAB_KERNEL );if (!ei)return NULL ; + ei->vfs_inode.i_version =0 ;return &ei->vfs_inode; }
fs/ntfs/inode.c +1 -1
@@ -495,7 +495,7 @@* This is for checking whether an inode has changed w.r.t. a file so * that the file can be updated if necessary (compare with f_version). */ - vi->i_version = ++event; + vi->i_version =0 ; vi->i_uid = vol->uid; vi->i_gid = vol->gid;
fs/ufs/dir.c +3 -3
@@ -353,7 +353,7 @@void ufs_set_link (struct inode *dir,struct ufs_dir_entry *de,struct buffer_head *bh,struct inode *inode) { - dir->i_version = ++event; + dir->i_version++; de->d_ino =cpu_to_fs32 (dir->i_sb, inode->i_ino);mark_buffer_dirty (bh);if (IS_DIRSYNC (dir)) {
@@ -463,7 +463,7 @@ }brelse (bh); dir->i_mtime = dir->i_ctime =CURRENT_TIME ; - dir->i_version = ++event; + dir->i_version++;mark_inode_dirty (dir);UFSD (("EXIT\n" ))
@@ -504,7 +504,7 @@fs16_add (sb, &pde->d_reclen,fs16_to_cpu (sb, dir->d_reclen)); dir->d_ino =0 ; - inode->i_version = ++event; + inode->i_version++; inode->i_ctime = inode->i_mtime =CURRENT_TIME ;mark_inode_dirty (inode);mark_buffer_dirty (bh);
fs/ufs/inode.c +1 -1
@@ -519,7 +519,7 @@ inode->i_mtime =fs32_to_cpu (sb, ufs_inode->ui_mtime.tv_sec); inode->i_blocks =fs32_to_cpu (sb, ufs_inode->ui_blocks); inode->i_blksize =PAGE_SIZE ;/* This is the optimal IO size (for stat) */ - inode->i_version = ++event; + inode->i_version++; ufsi->i_flags =fs32_to_cpu (sb, ufs_inode->ui_flags); ufsi->i_gen =fs32_to_cpu (sb, ufs_inode->ui_gen); ufsi->i_shadow =fs32_to_cpu (sb, ufs_inode->ui_u3.ui_sun.ui_shadow);
fs/ufs/super.c +1 -0
@@ -1006,6 +1006,7 @@ ei = (struct ufs_inode_info *)kmem_cache_alloc (ufs_inode_cachep,SLAB_KERNEL );if (!ei)return NULL ; + ei->vfs_inode.i_version =0 ;return &ei->vfs_inode; }