NFS: Fix a potential deadlock in nfs_release_page
authorNikita Danilov <nikita@clusterfs.com>
Wed, 9 Aug 2006 17:53:47 +0000 (13:53 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 24 Aug 2006 19:48:46 +0000 (15:48 -0400)
nfs_wb_page() waits on request completion and, as a result, is not safe to be
called from nfs_release_page() invoked by VM scanner as part of GFP_NOFS
allocation. Fix possible deadlock by analyzing gfp mask and refusing to
release page if __GFP_FS is not set.

Signed-off-by: Nikita Danilov <danilov@gmail.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
(cherry picked from 374d969debfb290bafcb41d28918dc6f7e43ce31 commit)


No differences found