udf: reduce leakage of blocks related to named streams
authorSteven J. Magnani <steve.magnani@digidescorp.com>
Wed, 14 Aug 2019 12:50:02 +0000 (07:50 -0500)
committerJan Kara <jack@suse.cz>
Mon, 26 Aug 2019 09:17:55 +0000 (11:17 +0200)
commitab9a3a737284b3d9e1d2ba43a0ef31b3ef2e2417
treeda1ecd5168487841b078727bfcb357edc1172e15
parent56db1991690f076c2a7e3b2a226629cd10901690
udf: reduce leakage of blocks related to named streams

Windows is capable of creating UDF files having named streams.
One example is the "Zone.Identifier" stream attached automatically
to files downloaded from a network. See:
  https://msdn.microsoft.com/en-us/library/dn392609.aspx

Modification of a file having one or more named streams in Linux causes
the stream directory to become detached from the file, essentially leaking
all blocks pertaining to the file's streams.

Fix by saving off information about an inode's streams when reading it,
for later use when its on-disk data is updated.

Link: https://lore.kernel.org/r/20190814125002.10869-1-steve@digidescorp.com
Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/udf/inode.c
fs/udf/super.c
fs/udf/udf_i.h