Closed renzhengeek closed 8 years ago
2472 /* 2473 * If we should update atime, we will get EX lock, 2474 * otherwise we just get PR lock. 2475 / 2476 if (ocfs2_should_update_atime(inode, vfsmnt)) { 2477 struct buffer_head bh = NULL; 2478 2479 ocfs2_inode_unlock(inode, 0); 2480 ret = ocfs2_inode_lock(inode, &bh, 1); 2481 if (ret < 0) { 2482 mlog_errno(ret); 2483 return ret; 2484 } 2485 level = 1; 2486 if (ocfs2_should_update_atime(inode, vfsmnt)) 2487 ocfs2_update_inode_atime(inode, bh); 2488 if (bh) 2489 brelse(bh); 2490 } else 2491 level = 0;
2472 /*
2473 * If we should update atime, we will get EX lock, 2474 * otherwise we just get PR lock. 2475 / 2476 if (ocfs2_should_update_atime(inode, vfsmnt)) { 2477 struct buffer_head bh = NULL; 2478
2479 ocfs2_inode_unlock(inode, 0); 2480 ret = ocfs2_inode_lock(inode, &bh, 1); 2481 if (ret < 0) { 2482 mlog_errno(ret); 2483 return ret; 2484 } 2485 level = 1; 2486 if (ocfs2_should_update_atime(inode, vfsmnt)) 2487 ocfs2_update_inode_atime(inode, bh); 2488 if (bh) 2489 brelse(bh); 2490 } else 2491 level = 0;