diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-01-12 23:07:46 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-01-12 23:07:46 +0100 |
commit | 0a87a2db485a1456b7427914969c0e8195a1bbda (patch) | |
tree | 8d0186672af22c6ee76118c471881cd66a36502d /drivers/staging/lustre/lustre/llite/xattr_cache.c | |
parent | drm/i915: Reserve shadow batch VMA analogue to others (diff) | |
parent | drm/i915: remove unused power_well/get_cdclk_freq api (diff) | |
download | linux-dev-0a87a2db485a1456b7427914969c0e8195a1bbda.tar.xz linux-dev-0a87a2db485a1456b7427914969c0e8195a1bbda.zip |
Merge tag 'topic/i915-hda-componentized-2015-01-12' into drm-intel-next-queued
Conflicts:
drivers/gpu/drm/i915/intel_runtime_pm.c
Separate branch so that Takashi can also pull just this refactoring
into sound-next.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'drivers/staging/lustre/lustre/llite/xattr_cache.c')
-rw-r--r-- | drivers/staging/lustre/lustre/llite/xattr_cache.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/staging/lustre/lustre/llite/xattr_cache.c b/drivers/staging/lustre/lustre/llite/xattr_cache.c index 627cbe242f22..e2badf17d95e 100644 --- a/drivers/staging/lustre/lustre/llite/xattr_cache.c +++ b/drivers/staging/lustre/lustre/llite/xattr_cache.c @@ -126,9 +126,7 @@ static int ll_xattr_cache_add(struct list_head *cache, return -ENOMEM; } - xattr->xe_namelen = strlen(xattr_name) + 1; - - xattr->xe_name = kzalloc(xattr->xe_namelen, GFP_NOFS); + xattr->xe_name = kstrdup(xattr_name, GFP_NOFS); if (!xattr->xe_name) { CDEBUG(D_CACHE, "failed to alloc xattr name %u\n", xattr->xe_namelen); @@ -141,7 +139,6 @@ static int ll_xattr_cache_add(struct list_head *cache, goto err_value; } - memcpy(xattr->xe_name, xattr_name, xattr->xe_namelen); memcpy(xattr->xe_value, xattr_val, xattr_val_len); xattr->xe_vallen = xattr_val_len; list_add(&xattr->xe_list, cache); |