[PATCH 3/3] btrfs: refactor btrfs_device->name updates

2014-11-30 Thread Omar Sandoval
The rcu_string API introduced some new sparse errors but also revealed existing ones. First of all, the name in struct btrfs_device should be annotated as __rcu to prevent unsafe reads. Additionally, updates should go through rcu_dereference_protected to make it clear what's going on. This introduc

Re: [PATCH 3/3] btrfs: refactor btrfs_device->name updates

2014-11-30 Thread Pranith Kumar
On Sun, Nov 30, 2014 at 3:26 AM, Omar Sandoval wrote: > The rcu_string API introduced some new sparse errors but also revealed > existing > ones. First of all, the name in struct btrfs_device should be annotated as > __rcu to prevent unsafe reads. Additionally, updates should go through > rcu_der

Re: [PATCH 3/3] btrfs: refactor btrfs_device->name updates

2014-11-30 Thread Omar Sandoval
On Sun, Nov 30, 2014 at 10:26:43AM -0500, Pranith Kumar wrote: > On Sun, Nov 30, 2014 at 3:26 AM, Omar Sandoval wrote: > > The rcu_string API introduced some new sparse errors but also revealed > > existing > > ones. First of all, the name in struct btrfs_device should be annotated as > > __rcu t