From edc27d2a53be494ad4bb5d2bf3b936625184f905 Mon Sep 17 00:00:00 2001 From: Tao Ma Date: Mon, 21 Feb 2011 11:18:30 +0800 Subject: [PATCH] --- yaml --- r: 243010 b: refs/heads/master c: 6218b90e7669d83cb8ad744f3400205d260597f2 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/ocfs2/inode.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index c8bfc123e353..26744925498d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 468eedde23d6c9335935773f4f5764267d5a7763 +refs/heads/master: 6218b90e7669d83cb8ad744f3400205d260597f2 diff --git a/trunk/fs/ocfs2/inode.c b/trunk/fs/ocfs2/inode.c index a96e56f12728..8ec0cb01cb7c 100644 --- a/trunk/fs/ocfs2/inode.c +++ b/trunk/fs/ocfs2/inode.c @@ -152,16 +152,16 @@ struct inode *ocfs2_iget(struct ocfs2_super *osb, u64 blkno, unsigned flags, /* inode was *not* in the inode cache. 2.6.x requires * us to do our own read_inode call and unlock it * afterwards. */ - if (inode && inode->i_state & I_NEW) { - mlog(0, "Inode was not in inode cache, reading it.\n"); - ocfs2_read_locked_inode(inode, &args); - unlock_new_inode(inode); - } if (inode == NULL) { inode = ERR_PTR(-ENOMEM); mlog_errno(PTR_ERR(inode)); goto bail; } + if (inode->i_state & I_NEW) { + mlog(0, "Inode was not in inode cache, reading it.\n"); + ocfs2_read_locked_inode(inode, &args); + unlock_new_inode(inode); + } if (is_bad_inode(inode)) { iput(inode); inode = ERR_PTR(-ESTALE);