Skip to content

Commit 23aedc4

Browse files
committed
Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Pull ext4 updates from Ted Ts'o: "Only miscellaneous cleanups and bug fixes for ext4 this cycle" * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: create ext4_kset dynamically ext4: create ext4_feat kobject dynamically ext4: release kobject/kset even when init/register fail ext4: fix incorrect indentation of if statement ext4: correct documentation for grpid mount option ext4: use 'sbi' instead of 'EXT4_SB(sb)' ext4: save error to disk in __ext4_grp_locked_error() jbd2: fix sphinx kernel-doc build warnings ext4: fix a race in the ext4 shutdown path mbcache: make sure c_entry_count is not decremented past zero ext4: no need flush workqueue before destroying it ext4: fixed alignment and minor code cleanup in ext4.h ext4: fix ENOSPC handling in DAX page fault handler dax: pass detailed error code from dax_iomap_fault() mbcache: revert "fs/mbcache.c: make count_objects() more robust" mbcache: initialize entry->e_referenced in mb_cache_entry_create() ext4: fix up remaining files with SPDX cleanups
2 parents 85b8bac + 5dc3971 commit 23aedc4

38 files changed

Lines changed: 407 additions & 364 deletions

‎Documentation/filesystems/ext4.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ data_err=ignore(*) Just print an error message if an error occurs
232232
data_err=abort Abort the journal if an error occurs in a file
233233
data buffer in ordered mode.
234234

235-
grpid Give objects the same group ID as their creator.
235+
grpid New objects have the group ID of their parent.
236236
bsdgroups
237237

238238
nogrpid (*) New objects have the group ID of their creator.

‎fs/dax.c‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,7 +1095,7 @@ static bool dax_fault_is_synchronous(unsigned long flags,
10951095
}
10961096

10971097
static int dax_iomap_pte_fault(struct vm_fault *vmf, pfn_t *pfnp,
1098-
const struct iomap_ops *ops)
1098+
int *iomap_errp, const struct iomap_ops *ops)
10991099
{
11001100
struct vm_area_struct *vma = vmf->vma;
11011101
struct address_space *mapping = vma->vm_file->f_mapping;
@@ -1148,6 +1148,8 @@ static int dax_iomap_pte_fault(struct vm_fault *vmf, pfn_t *pfnp,
11481148
* that we never have to deal with more than a single extent here.
11491149
*/
11501150
error = ops->iomap_begin(inode, pos, PAGE_SIZE, flags, &iomap);
1151+
if (iomap_errp)
1152+
*iomap_errp = error;
11511153
if (error) {
11521154
vmf_ret = dax_fault_return(error);
11531155
goto unlock_entry;
@@ -1481,6 +1483,7 @@ static int dax_iomap_pmd_fault(struct vm_fault *vmf, pfn_t *pfnp,
14811483
* @vmf: The description of the fault
14821484
* @pe_size: Size of the page to fault in
14831485
* @pfnp: PFN to insert for synchronous faults if fsync is required
1486+
* @iomap_errp: Storage for detailed error code in case of error
14841487
* @ops: Iomap ops passed from the file system
14851488
*
14861489
* When a page fault occurs, filesystems may call this helper in
@@ -1489,11 +1492,11 @@ static int dax_iomap_pmd_fault(struct vm_fault *vmf, pfn_t *pfnp,
14891492
* successfully.
14901493
*/
14911494
int dax_iomap_fault(struct vm_fault *vmf, enum page_entry_size pe_size,
1492-
pfn_t *pfnp, const struct iomap_ops *ops)
1495+
pfn_t *pfnp, int *iomap_errp, const struct iomap_ops *ops)
14931496
{
14941497
switch (pe_size) {
14951498
case PE_SIZE_PTE:
1496-
return dax_iomap_pte_fault(vmf, pfnp, ops);
1499+
return dax_iomap_pte_fault(vmf, pfnp, iomap_errp, ops);
14971500
case PE_SIZE_PMD:
14981501
return dax_iomap_pmd_fault(vmf, pfnp, ops);
14991502
default:

‎fs/ext2/file.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ static int ext2_dax_fault(struct vm_fault *vmf)
100100
}
101101
down_read(&ei->dax_sem);
102102

103-
ret = dax_iomap_fault(vmf, PE_SIZE_PTE, NULL, &ext2_iomap_ops);
103+
ret = dax_iomap_fault(vmf, PE_SIZE_PTE, NULL, NULL, &ext2_iomap_ops);
104104

105105
up_read(&ei->dax_sem);
106106
if (vmf->flags & FAULT_FLAG_WRITE)

‎fs/ext4/acl.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* SPDX-License-Identifier: GPL-2.0 */
1+
// SPDX-License-Identifier: GPL-2.0
22
/*
33
File: fs/ext4/acl.h
44

‎fs/ext4/balloc.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,10 +355,10 @@ static ext4_fsblk_t ext4_valid_block_bitmap(struct super_block *sb,
355355
blk = ext4_inode_table(sb, desc);
356356
offset = blk - group_first_block;
357357
next_zero_bit = ext4_find_next_zero_bit(bh->b_data,
358-
EXT4_B2C(sbi, offset + EXT4_SB(sb)->s_itb_per_group),
358+
EXT4_B2C(sbi, offset + sbi->s_itb_per_group),
359359
EXT4_B2C(sbi, offset));
360360
if (next_zero_bit <
361-
EXT4_B2C(sbi, offset + EXT4_SB(sb)->s_itb_per_group))
361+
EXT4_B2C(sbi, offset + sbi->s_itb_per_group))
362362
/* bad bitmap for inode tables */
363363
return blk;
364364
return 0;

‎fs/ext4/block_validity.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,11 @@ int ext4_setup_system_zone(struct super_block *sb)
147147
int ret;
148148

149149
if (!test_opt(sb, BLOCK_VALIDITY)) {
150-
if (EXT4_SB(sb)->system_blks.rb_node)
150+
if (sbi->system_blks.rb_node)
151151
ext4_release_system_zone(sb);
152152
return 0;
153153
}
154-
if (EXT4_SB(sb)->system_blks.rb_node)
154+
if (sbi->system_blks.rb_node)
155155
return 0;
156156

157157
for (i=0; i < ngroups; i++) {
@@ -173,7 +173,7 @@ int ext4_setup_system_zone(struct super_block *sb)
173173
}
174174

175175
if (test_opt(sb, DEBUG))
176-
debug_print_tree(EXT4_SB(sb));
176+
debug_print_tree(sbi);
177177
return 0;
178178
}
179179

‎fs/ext4/ext4.h‎

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* SPDX-License-Identifier: GPL-2.0 */
1+
// SPDX-License-Identifier: GPL-2.0
22
/*
33
* ext4.h
44
*
@@ -611,10 +611,10 @@ enum {
611611
/*
612612
* Flags used by ext4_free_blocks
613613
*/
614-
#define EXT4_FREE_BLOCKS_METADATA 0x0001
615-
#define EXT4_FREE_BLOCKS_FORGET 0x0002
616-
#define EXT4_FREE_BLOCKS_VALIDATED 0x0004
617-
#define EXT4_FREE_BLOCKS_NO_QUOT_UPDATE 0x0008
614+
#define EXT4_FREE_BLOCKS_METADATA 0x0001
615+
#define EXT4_FREE_BLOCKS_FORGET 0x0002
616+
#define EXT4_FREE_BLOCKS_VALIDATED 0x0004
617+
#define EXT4_FREE_BLOCKS_NO_QUOT_UPDATE 0x0008
618618
#define EXT4_FREE_BLOCKS_NOFREE_FIRST_CLUSTER 0x0010
619619
#define EXT4_FREE_BLOCKS_NOFREE_LAST_CLUSTER 0x0020
620620

@@ -1986,10 +1986,10 @@ static inline __le16 ext4_rec_len_to_disk(unsigned len, unsigned blocksize)
19861986

19871987
/* Legal values for the dx_root hash_version field: */
19881988

1989-
#define DX_HASH_LEGACY 0
1990-
#define DX_HASH_HALF_MD4 1
1991-
#define DX_HASH_TEA 2
1992-
#define DX_HASH_LEGACY_UNSIGNED 3
1989+
#define DX_HASH_LEGACY 0
1990+
#define DX_HASH_HALF_MD4 1
1991+
#define DX_HASH_TEA 2
1992+
#define DX_HASH_LEGACY_UNSIGNED 3
19931993
#define DX_HASH_HALF_MD4_UNSIGNED 4
19941994
#define DX_HASH_TEA_UNSIGNED 5
19951995

@@ -2000,16 +2000,14 @@ static inline u32 ext4_chksum(struct ext4_sb_info *sbi, u32 crc,
20002000
struct shash_desc shash;
20012001
char ctx[4];
20022002
} desc;
2003-
int err;
20042003

20052004
BUG_ON(crypto_shash_descsize(sbi->s_chksum_driver)!=sizeof(desc.ctx));
20062005

20072006
desc.shash.tfm = sbi->s_chksum_driver;
20082007
desc.shash.flags = 0;
20092008
*(u32 *)desc.ctx = crc;
20102009

2011-
err = crypto_shash_update(&desc.shash, address, length);
2012-
BUG_ON(err);
2010+
BUG_ON(crypto_shash_update(&desc.shash, address, length));
20132011

20142012
return *(u32 *)desc.ctx;
20152013
}

‎fs/ext4/ext4_extents.h‎

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,7 @@
1+
// SPDX-License-Identifier: GPL-2.0
12
/*
23
* Copyright (c) 2003-2006, Cluster File Systems, Inc, info@clusterfs.com
34
* Written by Alex Tomas <alex@clusterfs.com>
4-
*
5-
* This program is free software; you can redistribute it and/or modify
6-
* it under the terms of the GNU General Public License version 2 as
7-
* published by the Free Software Foundation.
8-
*
9-
* This program is distributed in the hope that it will be useful,
10-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12-
* GNU General Public License for more details.
13-
*
14-
* You should have received a copy of the GNU General Public License
15-
* along with this program; if not, write to the Free Software
16-
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-
175
*/
186

197
#ifndef _EXT4_EXTENTS

‎fs/ext4/ext4_jbd2.h‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1+
// SPDX-License-Identifier: GPL-2.0+
12
/*
23
* ext4_jbd2.h
34
*
45
* Written by Stephen C. Tweedie <sct@redhat.com>, 1999
56
*
67
* Copyright 1998--1999 Red Hat corp --- All Rights Reserved
78
*
8-
* This file is part of the Linux kernel and is made available under
9-
* the terms of the GNU General Public License, version 2, or at your
10-
* option, any later version, incorporated herein by reference.
11-
*
129
* Ext4-specific journaling extensions.
1310
*/
1411

‎fs/ext4/extents.c‎

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,11 @@
1+
// SPDX-License-Identifier: GPL-2.0
12
/*
23
* Copyright (c) 2003-2006, Cluster File Systems, Inc, info@clusterfs.com
34
* Written by Alex Tomas <alex@clusterfs.com>
45
*
56
* Architecture independence:
67
* Copyright (c) 2005, Bull S.A.
78
* Written by Pierre Peiffer <pierre.peiffer@bull.net>
8-
*
9-
* This program is free software; you can redistribute it and/or modify
10-
* it under the terms of the GNU General Public License version 2 as
11-
* published by the Free Software Foundation.
12-
*
13-
* This program is distributed in the hope that it will be useful,
14-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16-
* GNU General Public License for more details.
17-
*
18-
* You should have received a copy of the GNU General Public License
19-
* along with this program; if not, write to the Free Software
20-
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-
219
*/
2210

2311
/*

0 commit comments

Comments
 (0)