X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=module%2Fzfs%2Fzpl_file.c;fp=module%2Fzfs%2Fzpl_file.c;h=9c27b7f1d3b2f614a0e996f980da858780ab8548;hb=8630650a8d9cfba379a5b73bd95e903d577e0d8d;hp=2e9f72ad12d99f3452b2dbe47c5983f374dd885f;hpb=86dd0fd9222b6103c6533036c47b908ece944460;p=zfs.git diff --git a/module/zfs/zpl_file.c b/module/zfs/zpl_file.c index 2e9f72a..9c27b7f 100644 --- a/module/zfs/zpl_file.c +++ b/module/zfs/zpl_file.c @@ -357,8 +357,16 @@ zpl_putpage(struct page *pp, struct writeback_control *wbc, void *data) ASSERT(PageLocked(pp)); ASSERT(!PageWriteback(pp)); - + ASSERT(!(current->flags & PF_NOFS)); + + /* + * Annotate this call path with a flag that indicates that it is + * unsafe to use KM_SLEEP during memory allocations due to the + * potential for a deadlock. KM_PUSHPAGE should be used instead. + */ + current->flags |= PF_NOFS; (void) zfs_putpage(mapping->host, pp, wbc); + current->flags &= ~PF_NOFS; return (0); }