GFS2: Clean up gfs2_adjust_quota() and do_glock()
authorSteven Whitehouse <swhiteho@redhat.com>
Tue, 15 Sep 2009 19:42:56 +0000 (20:42 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 9 May 2011 22:55:11 +0000 (15:55 -0700)
commit120011ea116c37f481a212f5c3d00e827777f1ee
treeb5ccfc691b8f358e1dc0d98ea356192eca310f40
parenta89861f3694d7e5bcd3d1d2ab2abe040ca044e0a
GFS2: Clean up gfs2_adjust_quota() and do_glock()

commit 1e72c0f7c40e665d2ed40014750fdd2fa9968bcf upstream.

Both of these functions contained confusing and in one case
duplicate code. This patch adds a new check in do_glock()
so that we report -ENOENT if we are asked to sync a quota
entry which doesn't exist. Due to the previous patch this is
now reported correctly to userspace.

Also there are a few new comments, and I hope that the code
is easier to understand now.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/gfs2/quota.c