Revision 47420c799830d4676e544dbec56b2a7f787528f5 authored by Ryusuke Konishi on 07 April 2009, 02:01:45 UTC, committed by Linus Torvalds on 07 April 2009, 15:31:17 UTC
Pekka Enberg pointed out that double error handlings found after
nilfs_transaction_end() can be avoided by separating abort operation:

 OK, I don't understand this. The only way nilfs_transaction_end() can
 fail is if we have NILFS_TI_SYNC set and we fail to construct the
 segment. But why do we want to construct a segment if we don't commit?

 I guess what I'm asking is why don't we have a separate
 nilfs_transaction_abort() function that can't fail for the erroneous
 case to avoid this double error value tracking thing?

This does the separation and renames nilfs_transaction_end() to
nilfs_transaction_commit() for clarification.

Since, some calls of these functions were used just for exclusion control
against the segment constructor, they are replaced with semaphore
operations.

Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent a2e7d2d
History
File Mode Size
Kconfig -rw-r--r-- 2.5 KB
Makefile -rw-r--r-- 518 bytes
associola.c -rw-r--r-- 42.9 KB
auth.c -rw-r--r-- 23.9 KB
bind_addr.c -rw-r--r-- 13.4 KB
chunk.c -rw-r--r-- 8.0 KB
command.c -rw-r--r-- 2.3 KB
debug.c -rw-r--r-- 4.6 KB
endpointola.c -rw-r--r-- 13.0 KB
input.c -rw-r--r-- 30.5 KB
inqueue.c -rw-r--r-- 6.9 KB
ipv6.c -rw-r--r-- 28.0 KB
objcnt.c -rw-r--r-- 4.2 KB
output.c -rw-r--r-- 21.6 KB
outqueue.c -rw-r--r-- 52.5 KB
primitive.c -rw-r--r-- 7.6 KB
proc.c -rw-r--r-- 13.6 KB
protocol.c -rw-r--r-- 36.6 KB
sm_make_chunk.c -rw-r--r-- 97.1 KB
sm_sideeffect.c -rw-r--r-- 44.4 KB
sm_statefuns.c -rw-r--r-- 187.8 KB
sm_statetable.c -rw-r--r-- 33.5 KB
socket.c -rw-r--r-- 193.7 KB
ssnmap.c -rw-r--r-- 3.4 KB
sysctl.c -rw-r--r-- 7.6 KB
transport.c -rw-r--r-- 18.6 KB
tsnmap.c -rw-r--r-- 9.6 KB
ulpevent.c -rw-r--r-- 29.7 KB
ulpqueue.c -rw-r--r-- 27.9 KB

back to top