From: Josef Bacik Date: Tue, 25 Jan 2011 21:30:38 +0000 (-0500) Subject: Btrfs: change reserved_extents to an atomic_t X-Git-Tag: v2.6.39-rc1~19^2~41 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57a45ced94fe48a701361d64230fc16eefa189dd;p=pandora-kernel.git Btrfs: change reserved_extents to an atomic_t We track delayed allocation per inodes via 2 counters, one is outstanding_extents and reserved_extents. Outstanding_extents is already an atomic_t, but reserved_extents is not and is protected by a spinlock. So convert this to an atomic_t and instead of using a spinlock, use atomic_cmpxchg when releasing delalloc bytes. This makes our inode 72 bytes smaller, and reduces locking overhead (albiet it was minimal to begin with). Thanks, Signed-off-by: Josef Bacik --- Reading git-diff-tree failed