Re: [PATCH 2/4] fs/notify: don't put file handle buffer on stack.

2017-12-10 Thread Amir Goldstein
On Mon, Dec 11, 2017 at 8:04 AM, NeilBrown wrote: > A file handle buffer is not tiny, and could need to be larger in future, > so it isn't safe to allocate one on the stack. Instead, we need to > kmalloc(). > > There is no way to return an error status from a ->show_fdinfo() > function, so if the

[PATCH 2/4] fs/notify: don't put file handle buffer on stack.

2017-12-10 Thread NeilBrown
A file handle buffer is not tiny, and could need to be larger in future, so it isn't safe to allocate one on the stack. Instead, we need to kmalloc(). There is no way to return an error status from a ->show_fdinfo() function, so if the kmalloc fails, we silently exclude the filehandle from the ou