staging/lustre/llite: optimize ll_fid2path()
authorFrank Zago <fzago@cray.com>
Fri, 15 Aug 2014 16:48:12 +0000 (12:48 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 Aug 2014 16:38:43 +0000 (09:38 -0700)
commit2b358b4ea5b2912726d872611089e790a8388b62
treecfcdf1bc24bd414f608d124d02f315aa687ce093
parentb6ee56fe2afe10cf855de8d11b6097fa82c26163
staging/lustre/llite: optimize ll_fid2path()

The only parameter from userspace that matters is the length of the
buffer. We don't need to allocate then import the whole structure. By
importing only that length, we can save a memory allocation.

Add sparse annotations to that function.

Signed-off-by: frank zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/11167
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5389
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/file.c
drivers/staging/lustre/lustre/llite/llite_internal.h