diff options
author | Linus Torvalds | 2022-06-17 10:09:24 -0700 |
---|---|---|
committer | Linus Torvalds | 2022-06-17 10:09:24 -0700 |
commit | 5c0cd3d4a976b906c3953ff0a0595ba37e04aaa6 (patch) | |
tree | fb4809fb9005d15637dda4c13be197809d519044 /fs | |
parent | 274295c6e53f8b8b8dfa8b24a3fcb8a9d670c22c (diff) | |
parent | 4bca7e80b6455772b4bf3f536dcbc19aac424d6a (diff) |
Merge tag 'fs_for_v5.19-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull writeback and ext2 fixes from Jan Kara:
"A fix for writeback bug which prevented machines with kdevtmpfs from
booting and also one small ext2 bugfix in IO error handling"
* tag 'fs_for_v5.19-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
init: Initialize noop_backing_dev_info early
ext2: fix fs corruption when trying to remove a non-empty directory with IO error
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext2/dir.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c index 2c2f179b6977..43de293cef56 100644 --- a/fs/ext2/dir.c +++ b/fs/ext2/dir.c @@ -672,17 +672,14 @@ int ext2_empty_dir (struct inode * inode) void *page_addr = NULL; struct page *page = NULL; unsigned long i, npages = dir_pages(inode); - int dir_has_error = 0; for (i = 0; i < npages; i++) { char *kaddr; ext2_dirent * de; - page = ext2_get_page(inode, i, dir_has_error, &page_addr); + page = ext2_get_page(inode, i, 0, &page_addr); - if (IS_ERR(page)) { - dir_has_error = 1; - continue; - } + if (IS_ERR(page)) + goto not_empty; kaddr = page_addr; de = (ext2_dirent *)kaddr; |