Re: [PATCH] mm/cma_debug: Check for null tmp in cma_debugfs_add_one()

2019-02-21 Thread Greg KH
On Thu, Feb 21, 2019 at 04:56:42PM +0800, Yue Hu wrote: > On Thu, 21 Feb 2019 09:23:09 +0100 > Michal Hocko wrote: > > > On Thu 21-02-19 12:01:30, Yue Hu wrote: > > > From: Yue Hu > > > > > > If debugfs_create_dir() failed, the following debugfs_create_file() > > > will be meanless since it dep

Re: [PATCH] mm/cma_debug: Check for null tmp in cma_debugfs_add_one()

2019-02-21 Thread Greg KH
On Thu, Feb 21, 2019 at 09:45:25AM +0100, Michal Hocko wrote: > On Thu 21-02-19 09:36:24, Greg KH wrote: > > On Thu, Feb 21, 2019 at 09:23:09AM +0100, Michal Hocko wrote: > > > On Thu 21-02-19 12:01:30, Yue Hu wrote: > > > > From: Yue Hu > > > > > > > > If debugfs_create_dir() failed, the followi

Re: [PATCH] mm/cma_debug: Check for null tmp in cma_debugfs_add_one()

2019-02-21 Thread Yue Hu
On Thu, 21 Feb 2019 09:23:09 +0100 Michal Hocko wrote: > On Thu 21-02-19 12:01:30, Yue Hu wrote: > > From: Yue Hu > > > > If debugfs_create_dir() failed, the following debugfs_create_file() > > will be meanless since it depends on non-NULL tmp dentry and it will > > only waste CPU resource. >

Re: [PATCH] mm/cma_debug: Check for null tmp in cma_debugfs_add_one()

2019-02-21 Thread Michal Hocko
On Thu 21-02-19 09:36:24, Greg KH wrote: > On Thu, Feb 21, 2019 at 09:23:09AM +0100, Michal Hocko wrote: > > On Thu 21-02-19 12:01:30, Yue Hu wrote: > > > From: Yue Hu > > > > > > If debugfs_create_dir() failed, the following debugfs_create_file() > > > will be meanless since it depends on non-NU

Re: [PATCH] mm/cma_debug: Check for null tmp in cma_debugfs_add_one()

2019-02-21 Thread Greg KH
On Thu, Feb 21, 2019 at 09:23:09AM +0100, Michal Hocko wrote: > On Thu 21-02-19 12:01:30, Yue Hu wrote: > > From: Yue Hu > > > > If debugfs_create_dir() failed, the following debugfs_create_file() > > will be meanless since it depends on non-NULL tmp dentry and it will > > only waste CPU resource

Re: [PATCH] mm/cma_debug: Check for null tmp in cma_debugfs_add_one()

2019-02-21 Thread Michal Hocko
On Thu 21-02-19 12:01:30, Yue Hu wrote: > From: Yue Hu > > If debugfs_create_dir() failed, the following debugfs_create_file() > will be meanless since it depends on non-NULL tmp dentry and it will > only waste CPU resource. The file will be created in the debugfs root. But, more importantly. Gr

[PATCH] mm/cma_debug: Check for null tmp in cma_debugfs_add_one()

2019-02-20 Thread Yue Hu
From: Yue Hu If debugfs_create_dir() failed, the following debugfs_create_file() will be meanless since it depends on non-NULL tmp dentry and it will only waste CPU resource. Signed-off-by: Yue Hu --- mm/cma_debug.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/cma_debug.c b/mm/cma_