From: Jeff Mahoney Date: Wed, 2 Apr 2014 18:40:26 +0000 (-0400) Subject: reiserfs: fix race in readdir X-Git-Tag: v3.15-rc1~53^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01d8885785a60ae8f4c37b0ed75bdc96d0fc6a44;p=pandora-kernel.git reiserfs: fix race in readdir jdm-20004 reiserfs_delete_xattrs: Couldn't delete all xattrs (-2) The -ENOENT is due to readdir calling dir_emit on the same entry twice. If the dir_emit callback sleeps and the tree is changed underneath us, we won't be able to trust deh_offset(deh) anymore. We need to save next_pos before we might sleep so we can find the next entry. CC: stable@vger.kernel.org Signed-off-by: Jeff Mahoney Signed-off-by: Jan Kara --- Reading git-diff-tree failed