lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sat, 02 Feb 2008 11:40:23 -0500 From: "Theodore Ts'o" <tytso@....edu> To: linux-ext4@...r.kernel.org cc: Mingming Cao <cmm@...ibm.com>, Takashi Sato <t-sato@...jp.nec.com>, Akira Fujita <a-fujita@...jp.nec.com> Subject: Replace iget with iget_locked in defrag-free-space-fragementation FYI, since iget() is going to be disappearing in 2.6.25, and akpm has disabled ext4 in the -mm tree as a result, I'm folding the following patch into the defrag-free-space-fragmentation.patch in the ext4 tree. We also have an issue where the read-only bind patches from Dave Hansen are making changes which conflict with the ext4 patch tree, which is making akpm very grumpy. I'll try to take a look at this later in the weekend... - Ted diff --git a/fs/ext4/defrag.c b/fs/ext4/defrag.c index d9a14e4..6370fb8 100644 --- a/fs/ext4/defrag.c +++ b/fs/ext4/defrag.c @@ -287,9 +287,13 @@ static int ext4_ext_extents_info(struct ext4_extents_info *ext_info, int entries = 0; int err = 0; - inode = iget(sb, ext_info->ino); + inode = iget_locked(sb, ext_info->ino); if (!inode) return -EACCES; + if (inode->i_state & I_NEW) { + sb->s_op->read_inode(inode); + unlock_new_inode(inode); + } down_write(&EXT4_I(inode)->i_data_sem); @@ -588,9 +592,13 @@ static int ext4_ext_defrag_victim(struct file *target_filp, ext.len = 0; /* Get the inode of the victim file */ - victim_inode = iget(sb, ex_info->ino); + victim_inode = iget_locked(sb, ex_info->ino); if (!victim_inode) return -EACCES; + if (victim_inode->i_state & I_NEW) { + sb->s_op->read_inode(victim_inode); + unlock_new_inode(victim_inode); + } /* Setup file for the victim file */ victim_dent.d_inode = victim_inode; - To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists