ocfs2/quota: Release lock for error in ocfs2_quota_write.
PATCH 1/1 ocfs2/quota: Release lock for error in ocfs2_quota_write.
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 <[email protected]>
Signed-off-by Tao Ma <[email protected]>
--- fs/ocfs2/quota_global.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
fs/ocfs2/quota_global.c +1 -1
@@ -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)
Signature · 1 line
1.6.0.4
PATCH 1/1 ocfs2/quota: Release lock for error in ocfs2_quota_write.
Quoted 5 lines · Tao Ma
ocfs2_quota_writeneeds to release the lock if it fails to read quota block. So use "goto out" instead of "return err".Cc Jan Kara <[email protected]>Signed-off-by Tao Ma <[email protected]>
Ops, you are right.
Acked-by Jan Kara <[email protected]>
Honza
Quoted 20 lines
--- fs/ocfs2/quota_global.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)fs/ocfs2/quota_global.c +1
-1@@ -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)Signature · 1 line
1.6.0.4
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR
PATCH 1/1 ocfs2/quota: Release lock for error in ocfs2_quota_write.
In reply to Tao MaQuoted 5 lines · Tao Ma
ocfs2_quota_writeneeds to release the lock if it fails to read quota block. So use "goto out" instead of "return err".Cc Jan Kara <[email protected]>Signed-off-by Tao Ma <[email protected]>
This fix is now in the fixes branch of ocfs2.git.
Joel
Signature · 8 lines
"Copy from one, it's plagiarism; copy from two, it's research."
- Wilson Mizner
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127