Allow creation of file with filename length = MAXNAMELEN

This commit fixes a bug in filename validation code where we disallow creation
of file whose namelength = MAXNAMELEN.

Signed-off-by: Sachin Bhamare <sbhamare@panasas.com>
Close the open fd before unlinking to avoid un-intended consequences on certain
platforms.

This patch addresses the issue on nfs-ganesha running in Panasas environment
where unlinking an open file dscriptor results into silly rename of the file on
underlying filesystem. Intention here is to close the fd iff its the only open
reference and no clients have locks on the said fd.

Signed-off-by: Sachin Bhamare <sbhamare@panasas.com>