Revision tags: v6.6.25, v6.6.24, v6.6.23, v6.6.16, v6.6.15, v6.6.14, v6.6.13, v6.6.12, v6.6.11, v6.6.10, v6.6.9, v6.6.8, v6.6.7, v6.6.6, v6.6.5, v6.6.4, v6.6.3, v6.6.2, v6.5.11, v6.6.1, v6.5.10, v6.6, v6.5.9, v6.5.8, v6.5.7, v6.5.6, v6.5.5, v6.5.4, v6.5.3, v6.5.2, v6.1.51, v6.5.1, v6.1.50, v6.5, v6.1.49, v6.1.48, v6.1.46 |
|
#
83f99de1 |
| 15-Aug-2023 |
Ye Bin <yebin10@huawei.com> |
ext2: fix race between setxattr and write back
There's an issue when allocating xattrs as follows: Block Allocation Reservation Windows Map (ext2_try_to_allocate_with_rsv): reservation window 0x0000
ext2: fix race between setxattr and write back
There's an issue when allocating xattrs as follows: Block Allocation Reservation Windows Map (ext2_try_to_allocate_with_rsv): reservation window 0x000000006f105382 start: 0, end: 0 reservation window 0x000000008fd1a555 start: 1044, end: 1059 Window map complete. kernel BUG at fs/ext2/balloc.c:1158! invalid opcode: 0000 [#1] PREEMPT SMP KASAN RIP: 0010:ext2_try_to_allocate_with_rsv.isra.0+0x15c4/0x1800 Call Trace: <TASK> ext2_new_blocks+0x935/0x1690 ext2_new_block+0x73/0xa0 ext2_xattr_set2+0x74f/0x1730 ext2_xattr_set+0x12b6/0x2260 ext2_xattr_user_set+0x9c/0x110 __vfs_setxattr+0x139/0x1d0 __vfs_setxattr_noperm+0xfc/0x370 __vfs_setxattr_locked+0x205/0x2c0 vfs_setxattr+0x19d/0x3b0 do_setxattr+0xff/0x220 setxattr+0x123/0x150 path_setxattr+0x193/0x1e0 __x64_sys_setxattr+0xc8/0x170 do_syscall_64+0x35/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd
Above issue may happens as follows: setxattr write back ext2_xattr_set ext2_xattr_set2 ext2_new_block ext2_new_blocks ext2_try_to_allocate_with_rsv alloc_new_reservation --> group=0 [0, 1023] rsv [1016, 1023] do_writepages mpage_writepages write_cache_pages __mpage_writepage ext2_get_block ext2_get_blocks ext2_alloc_branch ext2_new_blocks ext2_try_to_allocate_with_rsv alloc_new_reservation -->group=1 [1024, 2047] rsv [1044, 1059] if ((my_rsv->rsv_start > group_last_block) || (my_rsv->rsv_end < group_first_block) rsv_window_dump BUG();
Now ext2 mkwrite doesn't allocate new blocks so for these cases we may be allocating blocks during writeback. However, there is no protection between ext2_xattr_set() and do_writepages() so these two functions can conflict on handling the reservation window. To solve about issue don't use the reservation window when allocating block for xattr.
Signed-off-by: Ye Bin <yebin10@huawei.com> Message-Id: <20230815112612.221145-4-yebin10@huawei.com> Signed-off-by: Jan Kara <jack@suse.cz>
show more ...
|
#
b450159d |
| 15-Aug-2023 |
Ye Bin <yebin10@huawei.com> |
ext2: introduce new flags argument for ext2_new_blocks()
This patch introduces a new flags argument for ext2_new_blocks() and also a new EXT2_ALLOC_NORESERVE flag.
Signed-off-by: Ye Bin <yebin10@hu
ext2: introduce new flags argument for ext2_new_blocks()
This patch introduces a new flags argument for ext2_new_blocks() and also a new EXT2_ALLOC_NORESERVE flag.
Signed-off-by: Ye Bin <yebin10@huawei.com> Message-Id: <20230815112612.221145-3-yebin10@huawei.com> Signed-off-by: Jan Kara <jack@suse.cz>
show more ...
|
#
2445a8a1 |
| 15-Aug-2023 |
Ye Bin <yebin10@huawei.com> |
ext2: remove ext2_new_block()
Now, only xattr allocate block use ext2_new_block(), so just opencode it in the xattr code.
Signed-off-by: Ye Bin <yebin10@huawei.com> Message-Id: <20230815112612.2211
ext2: remove ext2_new_block()
Now, only xattr allocate block use ext2_new_block(), so just opencode it in the xattr code.
Signed-off-by: Ye Bin <yebin10@huawei.com> Message-Id: <20230815112612.221145-2-yebin10@huawei.com> Signed-off-by: Jan Kara <jack@suse.cz>
show more ...
|
#
e8807634 |
| 15-Aug-2023 |
Georg Ottinger <g.ottinger@gmx.at> |
ext2: fix datatype of block number in ext2_xattr_set2()
I run a small server that uses external hard drives for backups. The backup software I use uses ext2 filesystems with 4KiB block size and the
ext2: fix datatype of block number in ext2_xattr_set2()
I run a small server that uses external hard drives for backups. The backup software I use uses ext2 filesystems with 4KiB block size and the server is running SELinux and therefore relies on xattr. I recently upgraded the hard drives from 4TB to 12TB models. I noticed that after transferring some TBs I got a filesystem error "Freeing blocks not in datazone - block = 18446744071529317386, count = 1" and the backup process stopped. Trying to fix the fs with e2fsck resulted in a completely corrupted fs. The error probably came from ext2_free_blocks(), and because of the large number 18e19 this problem immediately looked like some kind of integer overflow. Whereas the 4TB fs was about 1e9 blocks, the new 12TB is about 3e9 blocks. So, searching the ext2 code, I came across the line in fs/ext2/xattr.c:745 where ext2_new_block() is called and the resulting block number is stored in the variable block as an int datatype. If a block with a block number greater than INT32_MAX is returned, this variable overflows and the call to sb_getblk() at line fs/ext2/xattr.c:750 fails, then the call to ext2_free_blocks() produces the error.
Signed-off-by: Georg Ottinger <g.ottinger@gmx.at> Signed-off-by: Jan Kara <jack@suse.cz> Message-Id: <20230815100340.22121-1-g.ottinger@gmx.at>
show more ...
|
Revision tags: v6.1.45, v6.1.44, v6.1.43, v6.1.42, v6.1.41, v6.1.40, v6.1.39 |
|
#
fc4eed64 |
| 05-Jul-2023 |
Jeff Layton <jlayton@kernel.org> |
ext2: convert to ctime accessor functions
In later patches, we're going to change how the inode's ctime field is used. Switch to using accessor functions instead of raw accesses of inode->i_ctime.
ext2: convert to ctime accessor functions
In later patches, we're going to change how the inode's ctime field is used. Switch to using accessor functions instead of raw accesses of inode->i_ctime.
Signed-off-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jan Kara <jack@suse.cz> Message-Id: <20230705190309.579783-39-jlayton@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
show more ...
|
Revision tags: v6.1.38, v6.1.37, v6.1.36, v6.4, v6.1.35, v6.1.34, v6.1.33, v6.1.32, v6.1.31, v6.1.30, v6.1.29, v6.1.28, v6.1.27, v6.1.26, v6.3, v6.1.25, v6.1.24, v6.1.23, v6.1.22, v6.1.21 |
|
#
fae0a2b2 |
| 17-Mar-2023 |
Colin Ian King <colin.i.king@gmail.com> |
ext2: remove redundant assignment to pointer end
Pointer is assigned a value that is never read, the assignment is redundant and can be removed.
Cleans up clang-scan warning: fs/ext2/xattr.c:555:3:
ext2: remove redundant assignment to pointer end
Pointer is assigned a value that is never read, the assignment is redundant and can be removed.
Cleans up clang-scan warning: fs/ext2/xattr.c:555:3: warning: Value stored to 'end' is never read [deadcode.DeadStores] end = (char *)header + sb->s_blocksize;
Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz> Message-Id: <20230317143420.419005-1-colin.i.king@gmail.com>
show more ...
|
Revision tags: v6.1.20, v6.1.19, v6.1.18, v6.1.17, v6.1.16, v6.1.15, v6.1.14, v6.1.13, v6.2, v6.1.12, v6.1.11, v6.1.10 |
|
#
d549b741 |
| 01-Feb-2023 |
Christian Brauner <brauner@kernel.org> |
fs: rename generic posix acl handlers
Reflect in their naming and document that they are kept around for legacy reasons and shouldn't be used anymore by new code.
Reviewed-by: Christoph Hellwig <hc
fs: rename generic posix acl handlers
Reflect in their naming and document that they are kept around for legacy reasons and shouldn't be used anymore by new code.
Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
show more ...
|
#
a5488f29 |
| 01-Feb-2023 |
Christian Brauner <brauner@kernel.org> |
fs: simplify ->listxattr() implementation
The ext{2,4}, erofs, f2fs, and jffs2 filesystems use the same logic to check whether a given xattr can be listed. Simplify them and avoid open-coding the sa
fs: simplify ->listxattr() implementation
The ext{2,4}, erofs, f2fs, and jffs2 filesystems use the same logic to check whether a given xattr can be listed. Simplify them and avoid open-coding the same check by calling the helper we introduced earlier.
Reviewed-by: Christoph Hellwig <hch@lst.de> Cc: linux-f2fs-devel@lists.sourceforge.net Cc: linux-erofs@lists.ozlabs.org Cc: linux-ext4@vger.kernel.org Cc: linux-mtd@lists.infradead.org Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
show more ...
|
#
0c95c025 |
| 01-Feb-2023 |
Christian Brauner <brauner@kernel.org> |
fs: drop unused posix acl handlers
Remove struct posix_acl_{access,default}_handler for all filesystems that don't depend on the xattr handler in their inode->i_op->listxattr() method in any way. Th
fs: drop unused posix acl handlers
Remove struct posix_acl_{access,default}_handler for all filesystems that don't depend on the xattr handler in their inode->i_op->listxattr() method in any way. There's nothing more to do than to simply remove the handler. It's been effectively unused ever since we introduced the new posix acl api.
Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
show more ...
|
Revision tags: v6.1.9, v6.1.8, v6.1.7, v6.1.6, v6.1.5, v6.0.19, v6.0.18, v6.1.4, v6.1.3, v6.0.17, v6.1.2, v6.0.16, v6.1.1, v6.0.15, v6.0.14, v6.0.13, v6.1, v6.0.12, v6.0.11, v6.0.10, v5.15.80, v6.0.9, v5.15.79, v6.0.8, v5.15.78, v6.0.7, v5.15.77, v5.15.76, v6.0.6, v6.0.5, v5.15.75, v6.0.4, v6.0.3, v6.0.2, v5.15.74, v5.15.73, v6.0.1, v5.15.72, v6.0, v5.15.71, v5.15.70, v5.15.69, v5.15.68, v5.15.67, v5.15.66, v5.15.65, v5.15.64, v5.15.63, v5.15.62, v5.15.61, v5.15.60, v5.15.59, v5.19, v5.15.58, v5.15.57, v5.15.56, v5.15.55, v5.15.54 |
|
#
1189d8ec |
| 12-Jul-2022 |
Jan Kara <jack@suse.cz> |
ext2: avoid deleting xattr block that is being reused
Currently when we decide to reuse xattr block we detect the case when the last reference to xattr block is being dropped at the same time and ca
ext2: avoid deleting xattr block that is being reused
Currently when we decide to reuse xattr block we detect the case when the last reference to xattr block is being dropped at the same time and cancel the reuse attempt. Convert ext2 to a new scheme when as soon as matching mbcache entry is found, we wait with dropping the last xattr block reference until mbcache entry reference is dropped (meaning either the xattr block reference is increased or we decided not to reuse the block).
Signed-off-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20220712105436.32204-8-jack@suse.cz Signed-off-by: Theodore Ts'o <tytso@mit.edu>
show more ...
|
#
b67798d5 |
| 12-Jul-2022 |
Jan Kara <jack@suse.cz> |
ext2: unindent codeblock in ext2_xattr_set()
Replace one else in ext2_xattr_set() with a goto. This makes following code changes simpler to follow. No functional changes.
Signed-off-by: Jan Kara <j
ext2: unindent codeblock in ext2_xattr_set()
Replace one else in ext2_xattr_set() with a goto. This makes following code changes simpler to follow. No functional changes.
Signed-off-by: Jan Kara <jack@suse.cz> Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com> Link: https://lore.kernel.org/r/20220712105436.32204-7-jack@suse.cz Signed-off-by: Theodore Ts'o <tytso@mit.edu>
show more ...
|
#
90ae40d2 |
| 12-Jul-2022 |
Jan Kara <jack@suse.cz> |
ext2: factor our freeing of xattr block reference
Free of xattr block reference is opencode in two places. Factor it out into a separate function and use it.
Signed-off-by: Jan Kara <jack@suse.cz>
ext2: factor our freeing of xattr block reference
Free of xattr block reference is opencode in two places. Factor it out into a separate function and use it.
Signed-off-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20220712105436.32204-6-jack@suse.cz Signed-off-by: Theodore Ts'o <tytso@mit.edu>
show more ...
|
Revision tags: v5.15.53, v5.15.52, v5.15.51, v5.15.50, v5.15.49, v5.15.48, v5.15.47, v5.15.46, v5.15.45, v5.15.44, v5.15.43, v5.15.42, v5.18, v5.15.41, v5.15.40, v5.15.39, v5.15.38, v5.15.37, v5.15.36, v5.15.35, v5.15.34, v5.15.33, v5.15.32, v5.15.31, v5.17, v5.15.30, v5.15.29, v5.15.28, v5.15.27, v5.15.26, v5.15.25, v5.15.24, v5.15.23, v5.15.22, v5.15.21, v5.15.20, v5.15.19, v5.15.18, v5.15.17, v5.4.173, v5.15.16, v5.15.15, v5.16, v5.15.10, v5.15.9, v5.15.8, v5.15.7, v5.15.6, v5.15.5, v5.15.4, v5.15.3, v5.15.2, v5.15.1, v5.15, v5.14.14, v5.14.13, v5.14.12, v5.14.11, v5.14.10, v5.14.9, v5.14.8, v5.14.7, v5.14.6, v5.10.67, v5.10.66, v5.14.5, v5.14.4, v5.10.65, v5.14.3, v5.10.64, v5.14.2, v5.10.63, v5.14.1, v5.10.62, v5.14, v5.10.61, v5.10.60, v5.10.53, v5.10.52, v5.10.51, v5.10.50, v5.10.49, v5.13, v5.10.46, v5.10.43, v5.10.42, v5.10.41, v5.10.40, v5.10.39, v5.4.119, v5.10.36, v5.10.35, v5.10.34, v5.4.116, v5.10.33, v5.12, v5.10.32, v5.10.31, v5.10.30, v5.10.27, v5.10.26, v5.10.25, v5.10.24, v5.10.23, v5.10.22, v5.10.21, v5.10.20, v5.10.19, v5.4.101, v5.10.18, v5.10.17, v5.11, v5.10.16, v5.10.15, v5.10.14, v5.10, v5.8.17, v5.8.16, v5.8.15, v5.9, v5.8.14, v5.8.13, v5.8.12, v5.8.11, v5.8.10, v5.8.9, v5.8.8, v5.8.7, v5.8.6, v5.4.62, v5.8.5, v5.8.4, v5.4.61, v5.8.3, v5.4.60, v5.8.2, v5.4.59, v5.8.1, v5.4.58, v5.4.57, v5.4.56, v5.8, v5.7.12, v5.4.55, v5.7.11, v5.4.54, v5.7.10, v5.4.53, v5.4.52, v5.7.9, v5.7.8, v5.4.51, v5.4.50, v5.7.7 |
|
#
1197d04f |
| 26-Jun-2020 |
Chengguang Xu <cgxu519@mykernel.net> |
ext2: initialize quota info in ext2_xattr_set()
In order to correctly account/limit space usage, should initialize quota info before calling quota related functions.
Link: https://lore.kernel.org/r
ext2: initialize quota info in ext2_xattr_set()
In order to correctly account/limit space usage, should initialize quota info before calling quota related functions.
Link: https://lore.kernel.org/r/20200626054959.114177-1-cgxu519@mykernel.net Signed-off-by: Chengguang Xu <cgxu519@mykernel.net> Reviewed-by: Reviewed-by: Ritesh Harjani <riteshh@linux.ibm.com> Signed-off-by: Jan Kara <jack@suse.cz>
show more ...
|
Revision tags: v5.4.49, v5.7.6, v5.7.5, v5.4.48, v5.7.4, v5.7.3, v5.4.47, v5.4.46, v5.7.2, v5.4.45, v5.7.1 |
|
#
1fcbcf06 |
| 03-Jun-2020 |
Chengguang Xu <cgxu519@mykernel.net> |
ext2: fix improper assignment for e_value_offs
In the process of changing value for existing EA, there is an improper assignment of e_value_offs(setting to 0), because it will be reset to incorrect
ext2: fix improper assignment for e_value_offs
In the process of changing value for existing EA, there is an improper assignment of e_value_offs(setting to 0), because it will be reset to incorrect value in the following loop(shifting EA values before target). Delayed assignment can avoid this issue.
Link: https://lore.kernel.org/r/20200603084429.25344-1-cgxu519@mykernel.net Signed-off-by: Chengguang Xu <cgxu519@mykernel.net> Signed-off-by: Jan Kara <jack@suse.cz>
show more ...
|
Revision tags: v5.4.44, v5.7, v5.4.43, v5.4.42, v5.4.41, v5.4.40, v5.4.39, v5.4.38, v5.4.37, v5.4.36, v5.4.35, v5.4.34, v5.4.33, v5.4.32, v5.4.31, v5.4.30, v5.4.29, v5.6, v5.4.28 |
|
#
44a52022 |
| 22-Mar-2020 |
Randy Dunlap <rdunlap@infradead.org> |
ext2: fix empty body warnings when -Wextra is used
When EXT2_ATTR_DEBUG is not defined, modify the 2 debug macros to use the no_printk() macro instead of <nothing>. This fixes gcc warnings when -Wex
ext2: fix empty body warnings when -Wextra is used
When EXT2_ATTR_DEBUG is not defined, modify the 2 debug macros to use the no_printk() macro instead of <nothing>. This fixes gcc warnings when -Wextra is used:
../fs/ext2/xattr.c:252:42: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] ../fs/ext2/xattr.c:258:42: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] ../fs/ext2/xattr.c:330:42: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] ../fs/ext2/xattr.c:872:45: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
I have verified that the only object code change (with gcc 7.5.0) is the reversal of some instructions from 'cmp a,b' to 'cmp b,a'.
Link: https://lore.kernel.org/r/e18a7395-61fb-2093-18e8-ed4f8cf56248@infradead.org Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Jan Kara <jack@suse.com> Cc: linux-ext4@vger.kernel.org Signed-off-by: Jan Kara <jack@suse.cz>
show more ...
|
Revision tags: v5.4.27, v5.4.26 |
|
#
32302085 |
| 17-Mar-2020 |
Jan Kara <jack@suse.cz> |
ext2: fix debug reference to ext2_xattr_cache
Fix a debug-only build error in ext2/xattr.c:
When building without extra debugging, (and with another patch that uses no_printk() instead of <empty> f
ext2: fix debug reference to ext2_xattr_cache
Fix a debug-only build error in ext2/xattr.c:
When building without extra debugging, (and with another patch that uses no_printk() instead of <empty> for the ext2-xattr debug-print macros, this build error happens:
../fs/ext2/xattr.c: In function ‘ext2_xattr_cache_insert’: ../fs/ext2/xattr.c:869:18: error: ‘ext2_xattr_cache’ undeclared (first use in this function); did you mean ‘ext2_xattr_list’? atomic_read(&ext2_xattr_cache->c_entry_count));
Fix the problem by removing cached entry count from the debug message since otherwise we'd have to export the mbcache structure just for that.
Fixes: be0726d33cb8 ("ext2: convert to mbcache2") Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jan Kara <jack@suse.cz>
show more ...
|
Revision tags: v5.4.25, v5.4.24, v5.4.23 |
|
#
bc36dfff |
| 24-Feb-2020 |
Jan Kara <jack@suse.cz> |
ext2: Silence lockdep warning about reclaim under xattr_sem
Lockdep complains about a chain: sb_internal#2 --> &ei->xattr_sem#2 --> fs_reclaim
and shrink_dentry_list -> ext2_evict_inode -> ext2_x
ext2: Silence lockdep warning about reclaim under xattr_sem
Lockdep complains about a chain: sb_internal#2 --> &ei->xattr_sem#2 --> fs_reclaim
and shrink_dentry_list -> ext2_evict_inode -> ext2_xattr_delete_inode -> down_write(ei->xattr_sem) creating a locking cycle in the reclaim path. This is however a false positive because when we are in ext2_evict_inode() we are the only holder of the inode reference and nobody else should touch xattr_sem of that inode. So we cannot ever block on acquiring the xattr_sem in the reclaim path.
Silence the lockdep warning by using down_write_trylock() in ext2_xattr_delete_inode() to not create false locking dependency.
Reported-by: "J. R. Okajima" <hooanon05g@gmail.com> Reviewed-by: Ritesh Harjani <riteshh@linux.ibm.com> Signed-off-by: Jan Kara <jack@suse.cz>
show more ...
|
Revision tags: v5.4.22, v5.4.21, v5.4.20, v5.4.19, v5.4.18, v5.4.17, v5.4.16, v5.5, v5.4.15, v5.4.14, v5.4.13, v5.4.12, v5.4.11, v5.4.10, v5.4.9, v5.4.8, v5.4.7, v5.4.6, v5.4.5, v5.4.4, v5.4.3, v5.3.15, v5.4.2, v5.4.1, v5.3.14, v5.4, v5.3.13, v5.3.12, v5.3.11, v5.3.10, v5.3.9, v5.3.8, v5.3.7, v5.3.6, v5.3.5, v5.3.4, v5.3.3, v5.3.2, v5.3.1, v5.3, v5.2.14, v5.3-rc8, v5.2.13, v5.2.12, v5.2.11, v5.2.10, v5.2.9, v5.2.8, v5.2.7, v5.2.6, v5.2.5, v5.2.4, v5.2.3 |
|
#
e5d39597 |
| 23-Jul-2019 |
Chengguang Xu <cgxu519@zoho.com.cn> |
ext2: fix block range in ext2_data_block_valid()
For block validity we should check the block range from start_block to start_block + count - 1, so fix the range in ext2_data_block_valid() and also
ext2: fix block range in ext2_data_block_valid()
For block validity we should check the block range from start_block to start_block + count - 1, so fix the range in ext2_data_block_valid() and also modify the count argument properly in calling place.
Signed-off-by: Chengguang Xu <cgxu519@zoho.com.cn> Link: https://lore.kernel.org/r/20190723112155.20329-1-cgxu519@zoho.com.cn Signed-off-by: Jan Kara <jack@suse.cz>
show more ...
|
Revision tags: v5.2.2, v5.2.1, v5.2 |
|
#
90f15ac9 |
| 03-Jul-2019 |
Fuqian Huang <huangfq.daxian@gmail.com> |
ext2: Use kmemdup rather than duplicating its implementation
kmemdup is introduced to duplicate a region of memory in a neat way. Rather than kmalloc/kzalloc + memset, which the programmer needs to
ext2: Use kmemdup rather than duplicating its implementation
kmemdup is introduced to duplicate a region of memory in a neat way. Rather than kmalloc/kzalloc + memset, which the programmer needs to write the size twice (sometimes lead to mistakes), kmemdup improves readability, leads to smaller code and also reduce the chances of mistakes. Suggestion to use kmemdup rather than using kmalloc/kzalloc + memset.
Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com> Link: https://lore.kernel.org/r/20190703131727.25735-1-huangfq.daxian@gmail.com Signed-off-by: Jan Kara <jack@suse.cz>
show more ...
|
Revision tags: v5.1.16, v5.1.15, v5.1.14, v5.1.13, v5.1.12, v5.1.11, v5.1.10, v5.1.9, v5.1.8, v5.1.7, v5.1.6 |
|
#
1eaf5faa |
| 27-May-2019 |
Chengguang Xu <cgxu519@zoho.com.cn> |
ext2: optimize ext2_xattr_get()
Since xattr entry names are sorted, we don't have to continue when current entry name is greater than target.
Signed-off-by: Chengguang Xu <cgxu519@zoho.com.cn> Sign
ext2: optimize ext2_xattr_get()
Since xattr entry names are sorted, we don't have to continue when current entry name is greater than target.
Signed-off-by: Chengguang Xu <cgxu519@zoho.com.cn> Signed-off-by: Jan Kara <jack@suse.cz>
show more ...
|
#
d561d4dd |
| 27-May-2019 |
Chengguang Xu <cgxu519@zoho.com.cn> |
ext2: introduce new helper for xattr entry comparison
Introduce new helper ext2_xattr_cmp_entry() for xattr entry comparison.
Signed-off-by: Chengguang Xu <cgxu519@zoho.com.cn> Signed-off-by: Jan K
ext2: introduce new helper for xattr entry comparison
Introduce new helper ext2_xattr_cmp_entry() for xattr entry comparison.
Signed-off-by: Chengguang Xu <cgxu519@zoho.com.cn> Signed-off-by: Jan Kara <jack@suse.cz>
show more ...
|
#
9bb1d7a6 |
| 27-May-2019 |
Chengguang Xu <cgxu519@zoho.com.cn> |
ext2: merge xattr next entry check to ext2_xattr_entry_valid()
We have introduced ext2_xattr_entry_valid() for xattr entry sanity check, so it's better to do relevant things in one place.
Signed-of
ext2: merge xattr next entry check to ext2_xattr_entry_valid()
We have introduced ext2_xattr_entry_valid() for xattr entry sanity check, so it's better to do relevant things in one place.
Signed-off-by: Chengguang Xu <cgxu519@zoho.com.cn> Signed-off-by: Jan Kara <jack@suse.cz>
show more ...
|
Revision tags: v5.1.5, v5.1.4, v5.1.3 |
|
#
6c71b489 |
| 15-May-2019 |
Jan Kara <jack@suse.cz> |
ext2: Strengthen xattr block checks
Check every entry in xattr block for validity in ext2_xattr_set() to detect on disk corruption early. Also since e_value_block field in xattr entry is never != 0
ext2: Strengthen xattr block checks
Check every entry in xattr block for validity in ext2_xattr_set() to detect on disk corruption early. Also since e_value_block field in xattr entry is never != 0 in a valid filesystem, just remove checks for it once we have established entries are valid.
Reviewed-by: Chengguang Xu <cgxu519@zoho.com.cn> Signed-off-by: Jan Kara <jack@suse.cz>
show more ...
|
#
8cd0f2ba |
| 15-May-2019 |
Jan Kara <jack@suse.cz> |
ext2: Merge loops in ext2_xattr_set()
There are two very similar loops when searching xattr to set. Just merge them.
Reviewed-by: Chengguang Xu <cgxu519@zoho.com.cn> Signed-off-by: Jan Kara <jack@s
ext2: Merge loops in ext2_xattr_set()
There are two very similar loops when searching xattr to set. Just merge them.
Reviewed-by: Chengguang Xu <cgxu519@zoho.com.cn> Signed-off-by: Jan Kara <jack@suse.cz>
show more ...
|
Revision tags: v5.1.2 |
|
#
f4c3fb8c |
| 13-May-2019 |
Chengguang Xu <cgxu519@zoho.com.cn> |
ext2: introduce helper for xattr entry validation
Introduce helper function ext2_xattr_entry_valid() for xattr entry validation and clean up the entry check related code.
Reviewed-by: Andreas Dilge
ext2: introduce helper for xattr entry validation
Introduce helper function ext2_xattr_entry_valid() for xattr entry validation and clean up the entry check related code.
Reviewed-by: Andreas Dilger <adilger@dilger.ca> Signed-off-by: Chengguang Xu <cgxu519@zoho.com.cn> Signed-off-by: Jan Kara <jack@suse.cz>
show more ...
|