linux-stable/Documentation/filesystems
Xiubo Li 77be53ba04 netfs: do not unlock and put the folio twice
[ Upstream commit fac47b43c7 ]

check_write_begin() will unlock and put the folio when return
non-zero.  So we should avoid unlocking and putting it twice in
netfs layer.

Change the way ->check_write_begin() works in the following two ways:

 (1) Pass it a pointer to the folio pointer, allowing it to unlock and put
     the folio prior to doing the stuff it wants to do, provided it clears
     the folio pointer.

 (2) Change the return values such that 0 with folio pointer set means
     continue, 0 with folio pointer cleared means re-get and all error
     codes indicating an error (no special treatment for -EAGAIN).

[ bagasdotme: use Sphinx code text syntax for *foliop pointer ]

Cc: stable@vger.kernel.org
Link: https://tracker.ceph.com/issues/56423
Link: https://lore.kernel.org/r/cf169f43-8ee7-8697-25da-0204d1b4343e@redhat.com
Co-developed-by: David Howells <dhowells@redhat.com>
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-07-22 10:21:42 +02:00
..
caching fscache: Remove the cookie parameter from fscache_clear_page_bits() 2022-04-08 23:54:37 +01:00
cifs Documentation: ksmbd: update Feature Status table 2022-03-20 11:03:41 -05:00
ext4 ext4, doc: fix incorrect h_reserved size 2022-04-12 22:24:46 -04:00
nfs nfs: reexport documentation 2021-09-21 17:51:47 -04:00
spufs
9p.rst Replace HTTP links with HTTPS ones: 9P FILE SYSTEM 2020-07-13 11:28:12 -06:00
adfs.rst
affs.rst affs: fix basic permission bits to actually work 2020-08-31 12:20:31 +02:00
afs.rst AFS: Documentation: fix a few typos in afs.rst 2021-01-21 14:06:00 -07:00
api-summary.rst block: move fs/block_dev.c to block/bdev.c 2021-09-07 08:39:40 -06:00
autofs-mount-control.rst Documentation: filesystems: autofs-mount-control: drop doubled words 2020-07-05 14:44:29 -06:00
autofs.rst docs: filesystems: Fix grammatical error "with" to "which" 2021-11-15 02:54:37 -07:00
automount-support.rst
befs.rst
bfs.rst
btrfs.rst
ceph.rst doc: document new CephFS mount device syntax 2022-01-13 13:40:06 +01:00
coda.rst Documentation: coda: annotate duplicated words 2020-07-13 10:02:32 -06:00
configfs.rst Documentation: filesystems: configfs: drop doubled word 2020-07-05 14:44:29 -06:00
cramfs.rst
dax.rst Documentation/filesystem/dax: update DAX description on erofs 2022-03-16 09:38:38 +08:00
debugfs.rst debugfs: remove return value of debugfs_create_bool() 2021-05-21 20:59:03 +02:00
devpts.rst
directory-locking.rst Documentation: filesystems: directory-locking: drop doubled word 2020-07-05 14:44:29 -06:00
dlmfs.rst ocfs2: replace HTTP links with HTTPS ones 2020-08-07 11:33:22 -07:00
dnotify.rst
ecryptfs.rst
efivarfs.rst
erofs.rst erofs: rename ctime to mtime 2022-03-17 23:41:14 +08:00
ext2.rst docs: fix a cross-ref 2021-06-13 17:02:46 -06:00
ext3.rst
f2fs.rst f2fs: remove obsolete whint_mode 2022-04-20 11:16:43 -07:00
fiemap.rst A lot of bug fixes and cleanups for ext4, including: 2020-06-05 16:19:28 -07:00
files.rst file: Rename fcheck lookup_fd_rcu 2020-12-10 12:40:07 -06:00
fscrypt.rst fscrypt: update documentation for direct I/O support 2022-02-08 11:02:18 -08:00
fsverity.rst fs: Remove ->readpages address space operation 2022-04-01 13:45:33 -04:00
fuse-io.rst
fuse.rst fuse: update project homepage 2020-09-04 11:32:10 +02:00
gfs2-glocks.rst
gfs2-uevents.rst
gfs2.rst Documentation: Update filesystems/gfs2.rst 2020-12-01 00:25:20 +01:00
hfs.rst Replace HTTP links with HTTPS ones: Documentation/filesystems 2020-06-26 11:14:12 -06:00
hfsplus.rst
hpfs.rst Replace HTTP links with HTTPS ones: Documentation/filesystems 2020-06-26 11:14:12 -06:00
idmappings.rst docs: update mapping documentation 2021-12-03 18:58:11 +01:00
index.rst Documentation: remove reference to now removed mandatory-locking doc 2021-10-05 06:02:53 -04:00
inotify.rst
isofs.rst
journalling.rst jbd2: drop jbd2_fc_init documentation 2020-11-06 23:01:03 -05:00
locking.rst fs: Remove ->readpages address space operation 2022-04-01 13:45:33 -04:00
locks.rst docs: fs: locks.rst: update comment about mandatory file locking 2021-10-19 06:48:21 -04:00
mount_api.rst Documentation: mount_api: change kernel log wording 2020-12-03 15:53:13 -07:00
netfs_library.rst netfs: do not unlock and put the folio twice 2022-07-22 10:21:42 +02:00
nilfs2.rst
ntfs.rst
ntfs3.rst Doc/fs/ntfs3: Fix rst format and make it cleaner 2021-09-20 18:53:12 +03:00
ocfs2-online-filecheck.rst
ocfs2.rst ocfs2: replace HTTP links with HTTPS ones 2020-08-07 11:33:22 -07:00
omfs.rst Replace HTTP links with HTTPS ones: OMFS 2020-07-13 11:24:43 -06:00
orangefs.rst
overlayfs.rst ovl: skip checking lower file's i_writecount on truncate 2021-08-17 11:47:44 +02:00
path-lookup.rst Merge branch 'work.namei' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2021-07-03 11:41:14 -07:00
path-lookup.txt Replace HTTP links with HTTPS ones: documentation 2020-06-08 09:30:19 -06:00
porting.rst fs: introduce alloc_inode_sb() to allocate filesystems specific inode 2022-03-22 15:57:03 -07:00
proc.rst mm: add a field to store names for private anonymous memory 2022-01-15 16:30:27 +02:00
qnx6.rst
quota.rst quota: Fixup http links in quota doc 2020-07-09 08:14:01 +02:00
ramfs-rootfs-initramfs.rst Documentation: Fix intiramfs script name 2021-07-18 23:48:14 +09:00
relay.rst
romfs.rst
seq_file.rst seq_file: document how per-entry resources are managed. 2021-02-26 09:41:05 -08:00
sharedsubtree.rst
splice.rst
squashfs.rst
sysfs.rst Driver Core patches for 5.10-rc1 2020-10-14 16:09:32 -07:00
sysv-fs.rst
tmpfs.rst tmpfs: fix Documentation nits 2020-12-15 12:13:39 -08:00
ubifs-authentication.rst docs: ubifs-authentication: Add a top-level heading 2020-09-09 11:53:33 -06:00
ubifs.rst
udf.rst udf: Replace HTTP links with HTTPS ones 2020-07-14 14:37:39 +02:00
vfat.rst docs: filesystems: Fix a mundane typo 2021-03-25 11:51:23 -06:00
vfs.rst fs: Remove ->readpages address space operation 2022-04-01 13:45:33 -04:00
virtiofs.rst
xfs-delayed-logging-design.rst
xfs-self-describing-metadata.rst
zonefs.rst zonefs: document the explicit-open mount option 2020-09-15 18:32:58 +09:00