Since GFP_KERNEL is GFP_NOFS | __GFP_FS, usage like GFP_KERNEL | GFP_NOFS does not make sense. Drop __GFP_FS flag in order to avoid deadlock. Fixes: 32119446bb65 ("nfsd: define xattr functions to call into their vfs counterparts") Signed-off-by: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx> --- fs/nfsd/vfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 5783209f17fc..109b31246666 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c @@ -2164,7 +2164,7 @@ nfsd_getxattr(struct svc_rqst *rqstp, struct svc_fh *fhp, char *name, goto out; } - buf = kvmalloc(len, GFP_KERNEL | GFP_NOFS); + buf = kvmalloc(len, GFP_NOFS); if (buf == NULL) { err = nfserr_jukebox; goto out; @@ -2230,7 +2230,7 @@ nfsd_listxattr(struct svc_rqst *rqstp, struct svc_fh *fhp, char **bufp, /* * We're holding i_rwsem - use GFP_NOFS. */ - buf = kvmalloc(len, GFP_KERNEL | GFP_NOFS); + buf = kvmalloc(len, GFP_NOFS); if (buf == NULL) { err = nfserr_jukebox; goto out; -- 2.34.1