ceph: use ceph_seq_cmp() to compare migrate_seq

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
ceph: fix cache revoke race

handle following sequence of events:

- non-auth MDS revokes Fc cap. queue invalidate work
- auth MDS issues Fc cap through request reply. i_rdcache_gen gets
  increased.
- invalidate work runs. it finds i_rdcache_revoking != i_rdcache_gen,
  so it does nothing.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
ceph: fix trim caps

- don't trim auth cap if there are flusing caps
- don't trim auth cap if any 'write' cap is wanted
- allow trimming non-auth cap even if the inode is dirty

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
ceph: handle -ESTALE reply

Send requests that operate on path to directory's auth MDS if
mode == USE_AUTH_MDS. Always retry using the auth MDS if got
-ESTALE reply from non-auth MDS. Also clean up the code that
handles auth MDS change.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
ceph: check inode caps in ceph_d_revalidate

Some inodes in readdir reply may have no caps. Getattr mds request
for these inodes can return -ESTALE. The fix is consider dentry that
links to inode with no caps as invalid. Invalid dentry causes a
lookup request to send to the mds, the MDS will send caps back.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
ceph: handle session flush message

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
microblaze: Wire up defconfig to mmu_defconfig

Without this, "make defconfig" fails with

*** Can't find default configuration "arch/microblaze/defconfig"!

All other architectures either set KBUILD_DEFCONFIG, or provide
arch/*/defconfig.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
microblaze: Remove _fdt_start casts

_fdt_start is an array, i.e. a pointer.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michal Simek <monstr@monstr.eu>
Cc: microblaze-uclinux@itee.uq.edu.au
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
microblaze: Remove duplicate declarations of _stext[] and _etext[]

They're already provided by <asm/sections.h>.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michal Simek <monstr@monstr.eu>
Cc: microblaze-uclinux@itee.uq.edu.au
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
microblaze/uapi: Use Kbuild logic to include <asm-generic/types.h>

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michal Simek <monstr@monstr.eu>
Cc: microblaze-uclinux@itee.uq.edu.au
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
microblaze: Simplify fcpu helper function

Use of_property_read_u32() instead of all of_get_property
with big endian conversion.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
ceph: remove exported caps when handling cap import message

Version 3 cap import message includes the ID of the exported
caps. It allow us to remove the exported caps if we still haven't
received the corresponding cap export message.

We remove the exported caps because they are stale, keeping them
can compromise consistence.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
ceph: add open export target session helper

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
ceph: add imported caps when handling cap export message

Version 3 cap export message includes information about the imported
caps. It allows us to add the imported caps if the corresponding cap
import message still hasn't been received.

This allow us to handle situation that the importer MDS crashes and
the cap import message is missing.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
libceph: support CEPH_FEATURE_EXPORT_PEER

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
drm/gem: Always initialize the gem object in object_init

At least drm/i915 expects that the obj->dev pointer is set even in
failure paths. Specifically when the shmem initialization fails we
call i915_gem_object_free which needs to deref obj->base.dev to get at
the slab pointer in the device private structure. And the shmem
allocation can easily fail when userspace is hitting open file limits.

Doing the structure init even when the shmem file allocation fails
prevents this Oops.

This is a regression from

commit 89c8233f82d9c8af5b20e72e4a185a38a7d3c50b
Author: David Herrmann <dh.herrmann@gmail.com>
Date:   Thu Jul 11 11:56:32 2013 +0200

    drm/gem: simplify object initialization

v2: Add regression note which Chris supplied.

Testcase: igt/gem_fd_exhaustion
Reported-and-Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
References: http://lists.freedesktop.org/archives/intel-gfx/2014-January/038433.html
Cc: stable@vger.kernel.org
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Cc: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
ASoC: omap: Make RX51 depend on GPIOLIB due to jack usage

Since the GPIO jacks are only supported if gpiolib is built and fail to
compile otherwise add a build depedency.  This is unlikely to have any
practical impact outside of coverage testing.

Reported-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
drm/vmwgfx: Fix recently introduced sparse / smatch warnings and errors

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrant <jakob@vmware.com>
dell-laptop: fix to return error code in dell_send_intensity()

Fix to return error code instead always return 0 from function
dell_send_intensity().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
compal-laptop: Use devm_kzalloc to allocate local data structure

Reduce code size and simplify error path.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>