summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/rcu-string.h
Commit message (Collapse)AuthorAgeFilesLines
* btrfs: replace GPL boilerplate by SPDX -- headersDavid Sterba2018-04-121-14/+6
| | | | | | | | | | Remove GPL boilerplate text (long, short, one-line) and keep the rest, ie. personal, company or original source copyright statements. Add the SPDX header. Unify the include protection macros to match the file names. Signed-off-by: David Sterba <dsterba@suse.com>
* Btrfs: use rcu to protect device->nameJosef Bacik2012-06-141-0/+56
Al pointed out that we can just toss out the old name on a device and add a new one arbitrarily, so anybody who uses device->name in printk could possibly use free'd memory. Instead of adding locking around all of this he suggested doing it with RCU, so I've introduced a struct rcu_string that does just that and have gone through and protected all accesses to device->name that aren't under the uuid_mutex with rcu_read_lock(). This protects us and I will use it for dealing with removing the device that we used to mount the file system in a later patch. Thanks, Reviewed-by: David Sterba <dsterba@suse.cz> Signed-off-by: Josef Bacik <josef@redhat.com>
OpenPOWER on IntegriCloud