#
3f649ab7 |
| 03-Jun-2020 |
Kees Cook <keescook@chromium.org> |
treewide: Remove uninitialized_var() usage Using uninitialized_var() is dangerous as it papers over real bugs[1] (or can in the future), and suppresses unrelated compiler warnings (e
treewide: Remove uninitialized_var() usage Using uninitialized_var() is dangerous as it papers over real bugs[1] (or can in the future), and suppresses unrelated compiler warnings (e.g. "unused variable"). If the compiler thinks it is uninitialized, either simply initialize the variable or make compiler changes. In preparation for removing[2] the[3] macro[4], remove all remaining needless uses with the following script: git grep '\buninitialized_var\b' | cut -d: -f1 | sort -u | \ xargs perl -pi -e \ 's/\buninitialized_var\(([^\)]+)\)/\1/g; s:\s*/\* (GCC be quiet|to make compiler happy) \*/$::g;' drivers/video/fbdev/riva/riva_hw.c was manually tweaked to avoid pathological white-space. No outstanding warnings were found building allmodconfig with GCC 9.3.0 for x86_64, i386, arm64, arm, powerpc, powerpc64le, s390x, mips, sparc64, alpha, and m68k. [1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.com/ [2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1TGqCR5vQkCzWJ0QxK6CernOU6eedsudAixw@mail.gmail.com/ [3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz9knmPuXhOeg@mail.gmail.com/ [4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/ Reviewed-by: Leon Romanovsky <leonro@mellanox.com> # drivers/infiniband and mlx4/mlx5 Acked-by: Jason Gunthorpe <jgg@mellanox.com> # IB Acked-by: Kalle Valo <kvalo@codeaurora.org> # wireless drivers Reviewed-by: Chao Yu <yuchao0@huawei.com> # erofs Signed-off-by: Kees Cook <keescook@chromium.org>
show more ...
|
#
20f82999 |
| 01-Jul-2020 |
Andreas Gruenbacher <agruenba@redhat.com> |
gfs2: Rework read and page fault locking So far, gfs2 has taken the inode glocks inside the ->readpage and ->readahead address space operations. Since commit d4388340ae0b ("fs: conv
gfs2: Rework read and page fault locking So far, gfs2 has taken the inode glocks inside the ->readpage and ->readahead address space operations. Since commit d4388340ae0b ("fs: convert mpage_readpages to mpage_readahead"), gfs2_readahead is passed the pages to read ahead locked. With that, the current holder of the inode glock may be trying to lock one of those pages while gfs2_readahead is trying to take the inode glock, resulting in a deadlock. Fix that by moving the lock taking to the higher-level ->read_iter file and ->fault vm operations. This also gets rid of an ugly lock inversion workaround in gfs2_readpage. The cache consistency model of filesystems like gfs2 is such that if data is found in the page cache, the data is up to date and can be used without taking any filesystem locks. If a page is not cached, filesystem locks must be taken before populating the page cache. To avoid taking the inode glock when the data is already cached, gfs2_file_read_iter first tries to read the data with the IOCB_NOIO flag set. If that fails, the inode glock is taken and the operation is retried with the IOCB_NOIO flag cleared. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
show more ...
|
#
d4388340 |
| 01-Jun-2020 |
Matthew Wilcox (Oracle) <willy@infradead.org> |
fs: convert mpage_readpages to mpage_readahead Implement the new readahead aop and convert all callers (block_dev, exfat, ext2, fat, gfs2, hpfs, isofs, jfs, nilfs2, ocfs2, omfs, qnx6,
fs: convert mpage_readpages to mpage_readahead Implement the new readahead aop and convert all callers (block_dev, exfat, ext2, fat, gfs2, hpfs, isofs, jfs, nilfs2, ocfs2, omfs, qnx6, reiserfs & udf). The callers are all trivial except for GFS2 & OCFS2. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Junxiao Bi <junxiao.bi@oracle.com> # ocfs2 Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com> # ocfs2 Reviewed-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: John Hubbard <jhubbard@nvidia.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: William Kucharski <william.kucharski@oracle.com> Cc: Chao Yu <yuchao0@huawei.com> Cc: Cong Wang <xiyou.wangcong@gmail.com> Cc: Darrick J. Wong <darrick.wong@oracle.com> Cc: Eric Biggers <ebiggers@google.com> Cc: Gao Xiang <gaoxiang25@huawei.com> Cc: Jaegeuk Kim <jaegeuk@kernel.org> Cc: Michal Hocko <mhocko@suse.com> Cc: Zi Yan <ziy@nvidia.com> Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com> Cc: Miklos Szeredi <mszeredi@redhat.com> Link: http://lkml.kernel.org/r/20200414150233.24495-17-willy@infradead.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
show more ...
|
#
019dd669 |
| 17-Feb-2020 |
Bob Peterson <rpeterso@redhat.com> |
gfs2: don't allow releasepage to free bd still used for revokes Before this patch, function gfs2_releasepage would free any bd elements that had been used for the page being released. Ho
gfs2: don't allow releasepage to free bd still used for revokes Before this patch, function gfs2_releasepage would free any bd elements that had been used for the page being released. However, those bd elements may still be queued to the sd_log_revokes list, in which case we cannot free them until the revoke has been issued. This patch adds additional checks for bds that are still being used for revokes. Signed-off-by: Bob Peterson <rpeterso@redhat.com>
show more ...
|
#
e556280d |
| 10-Dec-2019 |
Bob Peterson <rpeterso@redhat.com> |
gfs2: minor cleanup: remove unneeded variable ret in gfs2_jdata_writepage This patch simply removes variable ret, which is used to store the return code of its call to __gfs2_jdata_write
gfs2: minor cleanup: remove unneeded variable ret in gfs2_jdata_writepage This patch simply removes variable ret, which is used to store the return code of its call to __gfs2_jdata_writepage, in favor of just returning the result directly. Signed-off-by: Bob Peterson <rpeterso@redhat.com>
show more ...
|
#
eb43e660 |
| 14-Nov-2019 |
Bob Peterson <rpeterso@redhat.com> |
gfs2: Introduce function gfs2_withdrawn Add function gfs2_withdrawn and replace all checks for the SDF_WITHDRAWN bit to call it. This does not change the logic or function of gfs2, and
gfs2: Introduce function gfs2_withdrawn Add function gfs2_withdrawn and replace all checks for the SDF_WITHDRAWN bit to call it. This does not change the logic or function of gfs2, and it facilitates later improvements to the withdraw sequence. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
show more ...
|
#
f3b64b57 |
| 31-Aug-2019 |
Andreas Gruenbacher <agruenba@redhat.com> |
gfs2: Some whitespace cleanups Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
|
#
45eb0504 |
| 02-Sep-2019 |
Andreas Gruenbacher <agruenba@redhat.com> |
gfs2: Minor PAGE_SIZE arithmetic cleanups Replace divisions by PAGE_SIZE with shifts by PAGE_SHIFT and similar. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
|
#
7770c93a |
| 01-Jul-2019 |
Christoph Hellwig <hch@lst.de> |
gfs2: use iomap_bmap instead of generic_block_bmap No need to indirect through get_blocks and buffer_heads when we can just use the iomap version. Signed-off-by: Christoph Hellw
gfs2: use iomap_bmap instead of generic_block_bmap No need to indirect through get_blocks and buffer_heads when we can just use the iomap version. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
show more ...
|
#
378b6cbf |
| 01-Jul-2019 |
Christoph Hellwig <hch@lst.de> |
gfs2: mark stuffed_readpage static Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
|
#
59c01c50 |
| 01-Jul-2019 |
Christoph Hellwig <hch@lst.de> |
gfs2: merge gfs2_writepage_common into gfs2_writepage There is no need to keep these two functions separate. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andreas
gfs2: merge gfs2_writepage_common into gfs2_writepage There is no need to keep these two functions separate. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
show more ...
|
#
eadd7535 |
| 01-Jul-2019 |
Christoph Hellwig <hch@lst.de> |
gfs2: merge gfs2_writeback_aops and gfs2_ordered_aops The only difference between the two is that gfs2_ordered_aops sets the set_page_dirty method to __set_page_dirty_buffers, but given
gfs2: merge gfs2_writeback_aops and gfs2_ordered_aops The only difference between the two is that gfs2_ordered_aops sets the set_page_dirty method to __set_page_dirty_buffers, but given that __set_page_dirty_buffers is the default, if no method is set, there is no need to to do that. Merge the two sets of operations into one. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
show more ...
|
#
e0ec0a6b |
| 01-Jul-2019 |
Christoph Hellwig <hch@lst.de> |
gfs2: remove the unused gfs2_stuffed_write_end function This function was overlooked when the write_begin and write_end address space operations were removed as part of gfs2's iomap conv
gfs2: remove the unused gfs2_stuffed_write_end function This function was overlooked when the write_begin and write_end address space operations were removed as part of gfs2's iomap conversion. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
show more ...
|
Revision tags: 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, v5.1.5, v5.1.4, v5.1.3, v5.1.2, v5.1.1, v5.0.14 |
|
#
04aea0ca |
| 07-May-2019 |
Bob Peterson <rpeterso@redhat.com> |
gfs2: Rename SDF_SHUTDOWN to SDF_WITHDRAWN Before this patch, the superblock flag indicating when a file system is withdrawn was called SDF_SHUTDOWN. This patch simply renames it to
gfs2: Rename SDF_SHUTDOWN to SDF_WITHDRAWN Before this patch, the superblock flag indicating when a file system is withdrawn was called SDF_SHUTDOWN. This patch simply renames it to the more obvious SDF_WITHDRAWN. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
show more ...
|
#
7336d0e6 |
| 31-May-2019 |
Thomas Gleixner <tglx@linutronix.de> |
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 Based on 1 normalized pattern(s): this copyrighted material is made available to anyone wishing to use mod
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 Based on 1 normalized pattern(s): this copyrighted material is made available to anyone wishing to use modify copy or redistribute it subject to the terms and conditions of the gnu general public license version 2 extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 44 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190531081038.653000175@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
Revision tags: v5.1, v5.0.13, v5.0.12, v5.0.11 |
|
#
d0a22a4b |
| 29-Apr-2019 |
Andreas Gruenbacher <agruenba@redhat.com> |
gfs2: Fix iomap write page reclaim deadlock Since commit 64bc06bb32ee ("gfs2: iomap buffered write support"), gfs2 is doing buffered writes by starting a transaction in iomap_begin, writ
gfs2: Fix iomap write page reclaim deadlock Since commit 64bc06bb32ee ("gfs2: iomap buffered write support"), gfs2 is doing buffered writes by starting a transaction in iomap_begin, writing a range of pages, and ending that transaction in iomap_end. This approach suffers from two problems: (1) Any allocations necessary for the write are done in iomap_begin, so when the data aren't journaled, there is no need for keeping the transaction open until iomap_end. (2) Transactions keep the gfs2 log flush lock held. When iomap_file_buffered_write calls balance_dirty_pages, this can end up calling gfs2_write_inode, which will try to flush the log. This requires taking the log flush lock which is already held, resulting in a deadlock. Fix both of these issues by not keeping transactions open from iomap_begin to iomap_end. Instead, start a small transaction in page_prepare and end it in page_done when necessary. Reported-by: Edwin Török <edvin.torok@citrix.com> Fixes: 64bc06bb32ee ("gfs2: iomap buffered write support") Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Bob Peterson <rpeterso@redhat.com>
show more ...
|
Revision tags: v5.0.10, v5.0.9, v5.0.8, v5.0.7, v5.0.6, v5.0.5, v5.0.4, v5.0.3, v4.19.29, v5.0.2, v4.19.28, v5.0.1, v4.19.27, v5.0, v4.19.26, v4.19.25, v4.19.24, v4.19.23, v4.19.22, v4.19.21, v4.19.20, v4.19.19, v4.19.18, v4.19.17, v4.19.16, v4.19.15, v4.19.14, v4.19.13, v4.19.12, v4.19.11, v4.19.10, v4.19.9, v4.19.8, v4.19.7, v4.19.6, v4.19.5, v4.19.4, v4.18.20, v4.19.3, v4.18.19, v4.19.2, v4.18.18 |
|
#
0ebbe4f9 |
| 06-Nov-2018 |
Andreas Gruenbacher <agruenba@redhat.com> |
gfs2: Fix the gfs2_invalidatepage description The comment incorrectly states that the function always returns 0. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
|
Revision tags: v4.18.17, v4.19.1, v4.19, v4.18.16, v4.18.15, v4.18.14 |
|
#
977767a7 |
| 12-Oct-2018 |
Andreas Gruenbacher <agruenba@redhat.com> |
gfs2: Clean up gfs2_is_{ordered,writeback} The gfs2_is_ordered and gfs2_is_writeback checks are weird in that they implicitly check for !gfs2_is_jdata. This makes understanding how to
gfs2: Clean up gfs2_is_{ordered,writeback} The gfs2_is_ordered and gfs2_is_writeback checks are weird in that they implicitly check for !gfs2_is_jdata. This makes understanding how to use those functions correctly a challenge. Clean this up by making gfs2_is_ordered and gfs2_is_writeback take a super block instead of an inode and by removing the implicit !gfs2_is_jdata checks. Update the callers accordingly. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
show more ...
|
Revision tags: v4.18.13, v4.18.12, v4.18.11, v4.18.10, v4.18.9, v4.18.7, v4.18.6, v4.18.5, v4.17.18, v4.18.4, v4.18.3, v4.17.17, v4.18.2, v4.17.16, v4.17.15, v4.18.1, v4.18, v4.17.14, v4.17.13, v4.17.12, v4.17.11, v4.17.10, v4.17.9, v4.17.8, v4.17.7, v4.17.6, v4.17.5, v4.17.4, v4.17.3, v4.17.2, v4.17.1, v4.17, v4.16, v4.15 |
|
#
10bbd235 |
| 05-Dec-2017 |
Matthew Wilcox <willy@infradead.org> |
pagevec: Use xa_mark_t Removes sparse warnings. Signed-off-by: Matthew Wilcox <willy@infradead.org>
|
#
f95cbb44 |
| 06-Jun-2018 |
Andreas Gruenbacher <agruenba@redhat.com> |
gfs2: use iomap_readpage for blocksize == PAGE_SIZE We only use iomap_readpage for pages that don't have buffer heads attached yet: iomap_readpage would otherwise read pages from disk th
gfs2: use iomap_readpage for blocksize == PAGE_SIZE We only use iomap_readpage for pages that don't have buffer heads attached yet: iomap_readpage would otherwise read pages from disk that are marked buffer_uptodate() but not PageUptodate(). Those pages may actually contain data more recent than what's on disk. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Reviewed-by: Bob Peterson <rpeterso@redhat.com>
show more ...
|
#
025d0e7f |
| 19-Mar-2018 |
Andreas Gruenbacher <agruenba@redhat.com> |
gfs2: Remove gfs2_write_{begin,end} Now that generic_file_write_iter is no longer used, there are no remaining users of these address space operations. Signed-off-by: Andreas Gr
gfs2: Remove gfs2_write_{begin,end} Now that generic_file_write_iter is no longer used, there are no remaining users of these address space operations. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Reviewed-by: Bob Peterson <rpeterso@redhat.com>
show more ...
|
#
967bcc91 |
| 19-Jun-2018 |
Andreas Gruenbacher <agruenba@redhat.com> |
gfs2: iomap direct I/O support The page unmapping previously done in gfs2_direct_IO is now done generically in iomap_dio_rw. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.
gfs2: iomap direct I/O support The page unmapping previously done in gfs2_direct_IO is now done generically in iomap_dio_rw. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Reviewed-by: Bob Peterson <rpeterso@redhat.com>
show more ...
|
#
64bc06bb |
| 24-Jun-2018 |
Andreas Gruenbacher <agruenba@redhat.com> |
gfs2: iomap buffered write support With the traditional page-based writes, blocks are allocated separately for each page written to. With iomap writes, we can allocate a lot more bl
gfs2: iomap buffered write support With the traditional page-based writes, blocks are allocated separately for each page written to. With iomap writes, we can allocate a lot more blocks at once, with a fraction of the allocation overhead for each page. Split calculating the number of blocks that can be allocated at a given position (gfs2_alloc_size) off from gfs2_iomap_alloc: that size determines the number of blocks to allocate and reserve in the journal. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Reviewed-by: Bob Peterson <rpeterso@redhat.com>
show more ...
|
#
845802b1 |
| 04-Jun-2018 |
Andreas Gruenbacher <agruenba@redhat.com> |
gfs2: Remove ordered write mode handling from gfs2_trans_add_data In journaled data mode, we need to add each buffer head to the current transaction. In ordered write mode, we only need
gfs2: Remove ordered write mode handling from gfs2_trans_add_data In journaled data mode, we need to add each buffer head to the current transaction. In ordered write mode, we only need to add the inode to the ordered inode list. So far, both cases are handled in gfs2_trans_add_data. This makes the code look misleading and is inefficient for small block sizes as well. Handle both cases separately instead. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Bob Peterson <rpeterso@redhat.com>
show more ...
|
#
d6382a35 |
| 04-Jun-2018 |
Andreas Gruenbacher <agruenba@redhat.com> |
gfs2: gfs2_stuffed_write_end cleanup First, change the sanity check in gfs2_stuffed_write_end to check for the actual write size instead of the requested write size. Second, use
gfs2: gfs2_stuffed_write_end cleanup First, change the sanity check in gfs2_stuffed_write_end to check for the actual write size instead of the requested write size. Second, use the existing teardown code in gfs2_write_end instead of duplicating it in gfs2_stuffed_write_end. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Bob Peterson <rpeterso@redhat.com>
show more ...
|