From: Sage Weil Date: Sun, 6 Nov 2011 05:06:31 +0000 (-0700) Subject: ceph: fix iput race when queueing inode work X-Git-Tag: v3.2-rc3~22^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15a2015fbc692e1c97d7ce12d96e077f5ae7ea6d;p=pandora-kernel.git ceph: fix iput race when queueing inode work If we queue a work item that calls iput(), make sure we ihold() before attempting to queue work. Otherwise our queued work might miraculously run before we notice the queue_work() succeeded and call ihold(), allowing the inode to be destroyed. That is, instead of if (queue_work(...)) ihold(); we need to do ihold(); if (!queue_work(...)) iput(); Reported-by: Amon Ott Signed-off-by: Sage Weil --- Reading git-diff-tree failed