]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: sysfs: protect reading label by lock
authorDavid Sterba <dsterba@suse.com>
Tue, 26 Apr 2016 14:22:06 +0000 (16:22 +0200)
committerDavid Sterba <dsterba@suse.com>
Fri, 6 May 2016 13:22:49 +0000 (15:22 +0200)
commit7f7b46b52ec515f683291d4a60dcece1039ee6c1
tree17d8f4c3a5bf27587fa7dadf730a2ef4f88798cd
parenta66f900890f98afb35d3c1f3768403cc92fba7d6
btrfs: sysfs: protect reading label by lock

If the label setting ioctl races with sysfs label handler, we could get
mixed result in the output, part old part new. We should either get the
old or new label. The chances to hit this race are low.

Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/sysfs.c