summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsfs.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2013-04-18 09:19:26 -0700
committerOlof Johansson <olof@lixom.net>2013-04-18 09:21:20 -0700
commitda0851fe3a8ebc416ab61ce50ef2fb3c3d7375c9 (patch)
tree833778d45f2327702f8abc89d236e71ab3b0e291 /fs/cifs/cifsfs.c
parent7fa7ed8e1c93dda575021f177a3f6957dc98b28f (diff)
parent4b23185ff5e1c2ada2845002a034e8840ab98b63 (diff)
downloadop-kernel-dev-da0851fe3a8ebc416ab61ce50ef2fb3c3d7375c9.zip
op-kernel-dev-da0851fe3a8ebc416ab61ce50ef2fb3c3d7375c9.tar.gz
Merge tag 'imx-dt-3.10' of git://git.linaro.org/people/shawnguo/linux-2.6 into next/dt
From Shawn Guo: The imx device tree changes for 3.10: * The huge diff stat is introduced by the pinctrl changes. With DTC macro support ready, we're moving those huge mount of data about pins out of pinctrl driver. * Device tree source updates for GPI, LDB, SRC, cpufreq-cpu0. * Initial imx6dl device tree support * Board level DTS changes for some imx27 and imx51 platforms. * tag 'imx-dt-3.10' of git://git.linaro.org/people/shawnguo/linux-2.6: (605 commits) ARM: dts: imx6dl-wandboard: Add USB Host support ARM: dts: imx51 cpu node ARM: dts: Add missing imx27-phytec-phycore dtb target ARM: dts: Add NFC support for i.MX27 Phytec PCM038 module ARM: i.MX51: Add PATA support ARM: dts: Add initial support for Wandboard Dual-Lite ARM: dts: imx: add initial imx6dl-sabreauto support ARM: dts: imx: add initial imx6dl-sabresd support ARM: dts: imx: make sabreauto and sabresd common pinctrl: add pinctrl driver for imx6sl pinctrl: add pinctrl driver for imx6dl ARM: dts: imx53: fix SD2_DATA1 pad AUDMUX_AUD4 configuration ARM: dts: MicroSys sbc6x support (i.MX6) ARM i.MX5: Add System Reset Controller (SRC) support for i.MX51 and i.MX53 ARM i.MX5: Add system reset controller (SRC) to i.MX51 and i.MX53 device tree ARM i.MX6q: Link system reset controller (SRC) to IPU in DT ARM i.MX6q: Add LDB device to device tree ARM: imx5 DT init cpufreq-cpu0 device ARM: imx27 DT init cpufreq-cpu0 device ARM i.MX53: Add LDB device to device tree ... Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r--fs/cifs/cifsfs.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 3cf8a15..345fc89 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -91,6 +91,30 @@ struct workqueue_struct *cifsiod_wq;
__u8 cifs_client_guid[SMB2_CLIENT_GUID_SIZE];
#endif
+/*
+ * Bumps refcount for cifs super block.
+ * Note that it should be only called if a referece to VFS super block is
+ * already held, e.g. in open-type syscalls context. Otherwise it can race with
+ * atomic_dec_and_test in deactivate_locked_super.
+ */
+void
+cifs_sb_active(struct super_block *sb)
+{
+ struct cifs_sb_info *server = CIFS_SB(sb);
+
+ if (atomic_inc_return(&server->active) == 1)
+ atomic_inc(&sb->s_active);
+}
+
+void
+cifs_sb_deactive(struct super_block *sb)
+{
+ struct cifs_sb_info *server = CIFS_SB(sb);
+
+ if (atomic_dec_and_test(&server->active))
+ deactivate_super(sb);
+}
+
static int
cifs_read_super(struct super_block *sb)
{
OpenPOWER on IntegriCloud