inotify: don't allocate max size buffer for manifest
inotify: don't allocate max size buffer for manifest

Currently we allocate a 64KB buffer to hold the manifest regardless
of how much is required.  We're already reading in the size of the
manifest, so by deferring allocating the buffer we can just allocate
what's needed.  Currently this buffer is leaked; that is still the
case after this patch (but a fix may be coming).

Change the type of the local variable "n" to match the type returned
by read().

Signed-off-by: Alex Elder <f429030cf5c0faf36fac3d102073b6e63a647baa@linaro.org>
Signed-off-by: Greg Kroah-Hartman <4645f7897fd33786a2ee1264d590b3c400559d85@google.com>

gregkh/gbsim,projectara/gbsim,projectara/gbsim,gregkh/gbsim