summaryrefslogtreecommitdiff
path: root/fs/udf/udf_i.h
diff options
context:
space:
mode:
authorSteven J. Magnani <steve.magnani@digidescorp.com>2019-08-14 07:50:02 -0500
committerJan Kara <jack@suse.cz>2019-08-26 11:17:55 +0200
commitab9a3a737284b3d9e1d2ba43a0ef31b3ef2e2417 (patch)
treeda1ecd5168487841b078727bfcb357edc1172e15 /fs/udf/udf_i.h
parent56db1991690f076c2a7e3b2a226629cd10901690 (diff)
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>
Diffstat (limited to 'fs/udf/udf_i.h')
-rw-r--r--fs/udf/udf_i.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/udf/udf_i.h b/fs/udf/udf_i.h
index 2ef0e212f08a..00d773d1b7cf 100644
--- a/fs/udf/udf_i.h
+++ b/fs/udf/udf_i.h
@@ -42,12 +42,15 @@ struct udf_inode_info {
unsigned i_efe : 1; /* extendedFileEntry */
unsigned i_use : 1; /* unallocSpaceEntry */
unsigned i_strat4096 : 1;
- unsigned reserved : 26;
+ unsigned i_streamdir : 1;
+ unsigned reserved : 25;
union {
struct short_ad *i_sad;
struct long_ad *i_lad;
__u8 *i_data;
} i_ext;
+ struct kernel_lb_addr i_locStreamdir;
+ __u64 i_lenStreams;
struct rw_semaphore i_data_sem;
struct udf_ext_cache cached_extent;
/* Spinlock for protecting extent cache */