Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

gfs2: minor evict_[un]linked_inode cleanup

Add gl helper variables in evict_unlinked_inode() and
evict_linked_inode(). This patch isn't very interesting by itself, but
it makes the next patch more readable.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>

+8 -6
+8 -6
fs/gfs2/super.c
··· 1283 1283 static int evict_unlinked_inode(struct inode *inode) 1284 1284 { 1285 1285 struct gfs2_inode *ip = GFS2_I(inode); 1286 + struct gfs2_glock *gl = ip->i_gl; 1286 1287 int ret; 1287 1288 1288 1289 if (S_ISDIR(inode->i_mode) && ··· 1318 1317 */ 1319 1318 1320 1319 ret = gfs2_dinode_dealloc(ip); 1321 - if (!ret && ip->i_gl) 1322 - gfs2_inode_remember_delete(ip->i_gl, ip->i_no_formal_ino); 1320 + if (!ret && gl) 1321 + gfs2_inode_remember_delete(gl, ip->i_no_formal_ino); 1323 1322 1324 1323 out: 1325 1324 return ret; ··· 1363 1362 struct super_block *sb = inode->i_sb; 1364 1363 struct gfs2_sbd *sdp = sb->s_fs_info; 1365 1364 struct gfs2_inode *ip = GFS2_I(inode); 1365 + struct gfs2_glock *gl = ip->i_gl; 1366 1366 struct address_space *metamapping; 1367 1367 int ret; 1368 1368 1369 - gfs2_log_flush(sdp, ip->i_gl, GFS2_LOG_HEAD_FLUSH_NORMAL | 1369 + gfs2_log_flush(sdp, gl, GFS2_LOG_HEAD_FLUSH_NORMAL | 1370 1370 GFS2_LFC_EVICT_INODE); 1371 - metamapping = gfs2_glock2aspace(ip->i_gl); 1372 - if (test_bit(GLF_DIRTY, &ip->i_gl->gl_flags)) { 1371 + metamapping = gfs2_glock2aspace(gl); 1372 + if (test_bit(GLF_DIRTY, &gl->gl_flags)) { 1373 1373 filemap_fdatawrite(metamapping); 1374 1374 filemap_fdatawait(metamapping); 1375 1375 } 1376 1376 write_inode_now(inode, 1); 1377 - gfs2_ail_flush(ip->i_gl, 0); 1377 + gfs2_ail_flush(gl, 0); 1378 1378 1379 1379 ret = gfs2_truncate_inode_pages(inode); 1380 1380 if (ret)