]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
fs/adfs: dir: improve update failure handling
authorRussell King <rmk+kernel@armlinux.org.uk>
Mon, 9 Dec 2019 11:10:01 +0000 (11:10 +0000)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 21 Jan 2020 01:12:41 +0000 (20:12 -0500)
commitf6075c79074378910e131bbebc9d1dab53fd9986
tree1940350c9ba18ed956b9c94db8e398edf5398777
parentae5df41390eb1c40b9a5c220673d8c31a4cb57db
fs/adfs: dir: improve update failure handling

When we update a directory, a number of errors may happen. If we failed
to find the entry to update, we can just release the directory buffers
as normal.

However, if we have some other error, we may have partially updated the
buffers, resulting in an invalid directory. In this case, we need to
discard the buffers to avoid writing the contents back to the media, and
later re-read the directory from the media.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/adfs/dir.c