diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-12-23 16:36:48 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-12-23 16:36:48 -0800 |
| commit | eda4b716ea1f2a647a39cebae66b3fae4c4b80e4 (patch) | |
| tree | ab4318b72be4635c1213aa0def631e1169307660 /fs/ocfs2/aops.c | |
| parent | 55fb78a3a80348d87b2e3d79f61f8a9252dd86f5 (diff) | |
| parent | 7d8f98769e7f4bc29c38789daeb416c6a7d7c241 (diff) | |
| download | lwn-eda4b716ea1f2a647a39cebae66b3fae4c4b80e4.tar.gz lwn-eda4b716ea1f2a647a39cebae66b3fae4c4b80e4.zip | |
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2:
ocfs2: Fix system inodes cache overflow.
ocfs2: Hold ip_lock when set/clear flags for indexed dir.
ocfs2: Adjust masklog flag values
Ocfs2: Teach 'coherency=full' O_DIRECT writes to correctly up_read i_alloc_sem.
ocfs2/dlm: Migrate lockres with no locks if it has a reference
Diffstat (limited to 'fs/ocfs2/aops.c')
| -rw-r--r-- | fs/ocfs2/aops.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index f1e962cb3b73..0d7c5540ad66 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c @@ -573,11 +573,14 @@ static void ocfs2_dio_end_io(struct kiocb *iocb, /* this io's submitter should not have unlocked this before we could */ BUG_ON(!ocfs2_iocb_is_rw_locked(iocb)); + if (ocfs2_iocb_is_sem_locked(iocb)) { + up_read(&inode->i_alloc_sem); + ocfs2_iocb_clear_sem_locked(iocb); + } + ocfs2_iocb_clear_rw_locked(iocb); level = ocfs2_iocb_rw_locked_level(iocb); - if (!level) - up_read(&inode->i_alloc_sem); ocfs2_rw_unlock(inode, level); if (is_async) |
