Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1677205 > unrolled thread
| Started by | Tahsin Erdogan <tahsin@google.com> |
|---|---|
| First post | 2017-06-28 23:50 +0200 |
| Last post | 2017-06-29 00:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] ext4: fix __ext4_xattr_set_credits() Tahsin Erdogan <tahsin@google.com> - 2017-06-28 23:50 +0200
Re: [PATCH] ext4: fix __ext4_xattr_set_credits() Andreas Dilger <adilger@dilger.ca> - 2017-06-29 00:30 +0200
| From | Tahsin Erdogan <tahsin@google.com> |
|---|---|
| Date | 2017-06-28 23:50 +0200 |
| Subject | [PATCH] ext4: fix __ext4_xattr_set_credits() |
| Message-ID | <tXt0u-yk-13@gated-at.bofh.it> |
__ext4_xattr_set_credits() calculates journal credits needed for a
set xattr operation. Currently, credits needed for quota updates are
added only if ea_inode feature is enabled which is wrong. Fix this by
moving quota related additions to above ea_inode feature check.
Fixes: 74c5bfa651af ("ext4: xattr inode deduplication")
Signed-off-by: Tahsin Erdogan <tahsin@google.com>
---
fs/ext4/xattr.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index ce12c3fb7e59..062756b4e6d8 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -845,6 +845,9 @@ static int __ext4_xattr_set_credits(struct super_block *sb,
*/
credits = 5;
+ /* Quota updates. */
+ credits += EXT4_MAXQUOTAS_TRANS_BLOCKS(sb);
+
/* We are done if ea_inode feature is not enabled. */
if (!ext4_has_feature_ea_inode(sb))
return credits;
@@ -878,9 +881,6 @@ static int __ext4_xattr_set_credits(struct super_block *sb,
/* Block bitmap and group descriptor updates for each block. */
credits += blocks * 2;
- /* Quota updates. */
- credits += EXT4_MAXQUOTAS_TRANS_BLOCKS(sb);
-
/* We may need to clone the existing xattr block in which case we need
* to increment ref counts for existing ea_inodes referenced by it.
*/
--
2.13.2.725.g09c95d1e9-goog
[toc] | [next] | [standalone]
| From | Andreas Dilger <adilger@dilger.ca> |
|---|---|
| Date | 2017-06-29 00:30 +0200 |
| Message-ID | <tXtDb-13b-1@gated-at.bofh.it> |
| In reply to | #1677205 |
[Multipart message — attachments visible in raw view] — view raw
On Jun 28, 2017, at 3:47 PM, Tahsin Erdogan <tahsin@google.com> wrote:
>
> __ext4_xattr_set_credits() calculates journal credits needed for a
> set xattr operation. Currently, credits needed for quota updates are
> added only if ea_inode feature is enabled which is wrong. Fix this by
> moving quota related additions to above ea_inode feature check.
>
> Fixes: 74c5bfa651af ("ext4: xattr inode deduplication")
>
> Signed-off-by: Tahsin Erdogan <tahsin@google.com>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
> ---
> fs/ext4/xattr.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
> index ce12c3fb7e59..062756b4e6d8 100644
> --- a/fs/ext4/xattr.c
> +++ b/fs/ext4/xattr.c
> @@ -845,6 +845,9 @@ static int __ext4_xattr_set_credits(struct super_block *sb,
> */
> credits = 5;
>
> + /* Quota updates. */
> + credits += EXT4_MAXQUOTAS_TRANS_BLOCKS(sb);
> +
> /* We are done if ea_inode feature is not enabled. */
> if (!ext4_has_feature_ea_inode(sb))
> return credits;
> @@ -878,9 +881,6 @@ static int __ext4_xattr_set_credits(struct super_block *sb,
> /* Block bitmap and group descriptor updates for each block. */
> credits += blocks * 2;
>
> - /* Quota updates. */
> - credits += EXT4_MAXQUOTAS_TRANS_BLOCKS(sb);
> -
> /* We may need to clone the existing xattr block in which case we need
> * to increment ref counts for existing ea_inodes referenced by it.
> */
> --
> 2.13.2.725.g09c95d1e9-goog
>
Cheers, Andreas
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web