[kernel/f17] Make sure userflags is initialized in hfsplus files (from Matthew Garrett)
Josh Boyer
jwboyer at fedoraproject.org
Wed Apr 18 18:12:47 UTC 2012
commit 052403b3c9000c3a57bb12306fa62ee34acf618b
Author: Josh Boyer <jwboyer at redhat.com>
Date: Wed Apr 18 14:05:08 2012 -0400
Make sure userflags is initialized in hfsplus files (from Matthew Garrett)
hfsplus-initialise-userflags.patch | 39 ++++++++++++++++++++++++++++++++++++
kernel.spec | 6 ++++-
2 files changed, 44 insertions(+), 1 deletions(-)
---
diff --git a/hfsplus-initialise-userflags.patch b/hfsplus-initialise-userflags.patch
new file mode 100644
index 0000000..7f0be15
--- /dev/null
+++ b/hfsplus-initialise-userflags.patch
@@ -0,0 +1,39 @@
+From f3922382ce930e76773fb06416a7a6081a8702ad Mon Sep 17 00:00:00 2001
+From: Matthew Garrett <mjg at redhat.com>
+Date: Tue, 13 Mar 2012 12:10:34 -0400
+Subject: [PATCH] hfsplus: initialise userflags
+
+The userflags field was being written to the filesystem without being
+initialised. Make sure it's clear, since otherwise files end up with
+garbage attributes.
+
+Signed-off-by: Matthew Garrett <mjg at redhat.com>
+Signed-off-by: Christoph Hellwig <hch at lst.de>
+Signed-off-by: Al Viro <viro at zeniv.linux.org.uk>
+---
+ fs/hfsplus/inode.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c
+index 6643b24..82b69ee 100644
+--- a/fs/hfsplus/inode.c
++++ b/fs/hfsplus/inode.c
+@@ -193,6 +193,7 @@ static struct dentry *hfsplus_file_lookup(struct inode *dir,
+ mutex_init(&hip->extents_lock);
+ hip->extent_state = 0;
+ hip->flags = 0;
++ hip->userflags = 0;
+ set_bit(HFSPLUS_I_RSRC, &hip->flags);
+
+ err = hfs_find_init(HFSPLUS_SB(sb)->cat_tree, &fd);
+@@ -400,6 +401,7 @@ struct inode *hfsplus_new_inode(struct super_block *sb, umode_t mode)
+ atomic_set(&hip->opencnt, 0);
+ hip->extent_state = 0;
+ hip->flags = 0;
++ hip->userflags = 0;
+ memset(hip->first_extents, 0, sizeof(hfsplus_extent_rec));
+ memset(hip->cached_extents, 0, sizeof(hfsplus_extent_rec));
+ hip->alloc_blocks = 0;
+--
+1.7.7.6
+
diff --git a/kernel.spec b/kernel.spec
index e6d346b..e4e7527 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -54,7 +54,7 @@ Summary: The Linux kernel
# For non-released -rc kernels, this will be appended after the rcX and
# gitX tags, so a 3 here would become part of release "0.rcX.gitX.3"
#
-%global baserelease 4
+%global baserelease 5
%global fedora_build %{baserelease}
# base_sublevel is the kernel version we're starting with and patching
@@ -747,6 +747,8 @@ Patch21094: power-x86-destdir.patch
Patch21095: hfsplus-Change-finder_info-to-u32.patch
Patch21096: hfsplus-Add-an-ioctl-to-bless-files.patch
+Patch21097: hfsplus-initialise-userflags.patch
+
#rhbz 754518
Patch21235: scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch
@@ -1497,6 +1499,7 @@ ApplyPatch power-x86-destdir.patch
ApplyPatch hfsplus-Change-finder_info-to-u32.patch
ApplyPatch hfsplus-Add-an-ioctl-to-bless-files.patch
+ApplyPatch hfsplus-initialise-userflags.patch
#rhbz 754518
ApplyPatch scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch
@@ -2396,6 +2399,7 @@ fi
# '-'
%changelog
* Wed Apr 18 2012 Josh Boyer <jwboyer at redhat.com>
+- Make sure userflags is initialized in hfsplus files (from Matthew Garrett)
- Change patch to resolve libata hotplug (rhbz 807632)
* Tue Apr 17 2012 Josh Boyer <jwboyer at redhat.com>
More information about the scm-commits
mailing list