| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. |
|---|
| 3 | 4 | * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. |
|---|
| 4 | | - * |
|---|
| 5 | | - * This copyrighted material is made available to anyone wishing to use, |
|---|
| 6 | | - * modify, copy, or redistribute it subject to the terms and conditions |
|---|
| 7 | | - * of the GNU General Public License version 2. |
|---|
| 8 | 5 | */ |
|---|
| 9 | 6 | |
|---|
| 10 | 7 | #include <linux/sched.h> |
|---|
| .. | .. |
|---|
| 24 | 21 | #include "glock.h" |
|---|
| 25 | 22 | #include "inode.h" |
|---|
| 26 | 23 | #include "meta_io.h" |
|---|
| 24 | +#include "quota.h" |
|---|
| 27 | 25 | #include "rgrp.h" |
|---|
| 28 | 26 | #include "trans.h" |
|---|
| 29 | 27 | #include "util.h" |
|---|
| .. | .. |
|---|
| 119 | 117 | if (acl && acl->a_count > GFS2_ACL_MAX_ENTRIES(GFS2_SB(inode))) |
|---|
| 120 | 118 | return -E2BIG; |
|---|
| 121 | 119 | |
|---|
| 122 | | - ret = gfs2_rsqa_alloc(ip); |
|---|
| 120 | + ret = gfs2_qa_get(ip); |
|---|
| 123 | 121 | if (ret) |
|---|
| 124 | 122 | return ret; |
|---|
| 125 | 123 | |
|---|
| 126 | 124 | if (!gfs2_glock_is_locked_by_me(ip->i_gl)) { |
|---|
| 127 | 125 | ret = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh); |
|---|
| 128 | 126 | if (ret) |
|---|
| 129 | | - return ret; |
|---|
| 127 | + goto out; |
|---|
| 130 | 128 | need_unlock = true; |
|---|
| 131 | 129 | } |
|---|
| 132 | 130 | |
|---|
| .. | .. |
|---|
| 146 | 144 | unlock: |
|---|
| 147 | 145 | if (need_unlock) |
|---|
| 148 | 146 | gfs2_glock_dq_uninit(&gh); |
|---|
| 147 | +out: |
|---|
| 148 | + gfs2_qa_put(ip); |
|---|
| 149 | 149 | return ret; |
|---|
| 150 | 150 | } |
|---|