ocfs2: Fix ocfs2_read_quota_block() error handling.
authorJoel Becker <Joel.Becker@oracle.com>
Tue, 25 Nov 2008 14:31:27 +0000 (15:31 +0100)
committerMark Fasheh <mfasheh@suse.com>
Mon, 5 Jan 2009 16:40:24 +0000 (08:40 -0800)
commit85eb8b73d66530bb7b931789ae7a5ec9744eed34
tree4590be147364e0437f23a0d6bf72ccc900852eb9
parent57a09a7b3d9445a17c78d544f1e49d4d7d61705a
ocfs2: Fix ocfs2_read_quota_block() error handling.

ocfs2_bread() has become ocfs2_read_virt_blocks(), with a prototype to
match ocfs2_read_blocks().  The quota code, converting from
ocfs2_bread(), wraps the call to ocfs2_read_virt_blocks() in
ocfs2_read_quota_block().  Unfortunately, the prototype of
ocfs2_read_quota_block() matches the old prototype of ocfs2_bread().

The problem is that ocfs2_bread() returned the buffer head, and callers
assumed that a NULL pointer was indicative of error.  It wasn't.  This
is why ocfs2_bread() took an int*err argument as well.

The new prototype of ocfs2_read_virt_blocks() avoids this error handling
confusion.  Let's change ocfs2_read_quota_block() to match.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
fs/ocfs2/dlmglue.c
fs/ocfs2/quota.h
fs/ocfs2/quota_global.c
fs/ocfs2/quota_local.c