Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 56996
b: refs/heads/master
c: e9dfc0b
h: refs/heads/master
v: v3
  • Loading branch information
Mark Fasheh committed May 25, 2007
1 parent cbe8df5 commit 33eb430
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1c1ee4c3e7e16d23166a624a132889df3c540a18
refs/heads/master: e9dfc0b2bc42761410e8db6c252c6c5889e178b8
6 changes: 5 additions & 1 deletion trunk/fs/ocfs2/aops.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,10 @@ static int ocfs2_readpage(struct file *file, struct page *page)
goto out;
}

down_read(&OCFS2_I(inode)->ip_alloc_sem);
if (down_read_trylock(&OCFS2_I(inode)->ip_alloc_sem) == 0) {
ret = AOP_TRUNCATED_PAGE;
goto out_meta_unlock;
}

/*
* i_size might have just been updated as we grabed the meta lock. We
Expand Down Expand Up @@ -258,6 +261,7 @@ static int ocfs2_readpage(struct file *file, struct page *page)
ocfs2_data_unlock(inode, 0);
out_alloc:
up_read(&OCFS2_I(inode)->ip_alloc_sem);
out_meta_unlock:
ocfs2_meta_unlock(inode, 0);
out:
if (unlock)
Expand Down

0 comments on commit 33eb430

Please sign in to comment.