[Ocfs2-devel] [PATCH] ocfs2/quota: Release lock for error in ocfs2_quota_write.
Tao Ma
tao.ma at oracle.com
Thu Jul 30 01:07:10 PDT 2009
ocfs2_quota_write needs to release the lock if it fails to
read quota block. So use "goto out" instead of "return err".
Cc: Jan Kara <jack at suse.cz>
Signed-off-by: Tao Ma <tao.ma at oracle.com>
---
fs/ocfs2/quota_global.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/ocfs2/quota_global.c b/fs/ocfs2/quota_global.c
index edfa60c..e1c40e3 100644
--- a/fs/ocfs2/quota_global.c
+++ b/fs/ocfs2/quota_global.c
@@ -234,7 +234,7 @@ ssize_t ocfs2_quota_write(struct super_block *sb, int type,
}
if (err) {
mlog_errno(err);
- return err;
+ goto out;
}
lock_buffer(bh);
if (new)
--
1.6.0.4
More information about the Ocfs2-devel
mailing list