Skip to contentSkip to conversation

Provides DFS shrinkable submounts functionality

PATCH New Q (Igor Mammedov) 1 participant 1 message Jan 17, 2008 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 Provides DFS shrinkable submounts functionality

Christoph, thanks for your review. Here is the dfs patch 1/4 I rewrote taking into account your comments.

Patch still depends on patch 1/3 that is to be fixed yet.

---
 fs/cifs/Makefile       |    2 +-
 fs/cifs/cifs_dfs_ref.c |  376 ++++++++++++++++++++++++++++++++++++++++++++++++
 fs/cifs/cifs_dfs_ref.h |   28 ++++
 fs/cifs/cifsfs.c       |    3 +
 4 files changed, 408 insertions(+), 1 deletions(-)
 create mode 100644 fs/cifs/cifs_dfs_ref.c
 create mode 100644 fs/cifs/cifs_dfs_ref.h
fs/cifs/Makefile +1 -1
index 09898b8..6ba43fb 100644
@@ -10,4 +10,4 @@ cifs-y := cifsfs.o cifssmb.o cifs_debug.o connect.o dir.o file.o inode.o \
 
 cifs-$(CONFIG_CIFS_UPCALL) += cifs_spnego.o
 
-cifs-$(CONFIG_CIFS_DFS_UPCALL) += dns_resolve.o
+cifs-$(CONFIG_CIFS_DFS_UPCALL) += dns_resolve.o cifs_dfs_ref.o
fs/cifs/cifs_dfs_ref.c new file +376 -0

376 lines not on this page · raw message

fs/cifs/cifs_dfs_ref.h new file +28 -0
new file mode 100644
index 0000000..794c6e4
@@ -0,0 +1,28 @@
+/*
+ *   Contains the CIFS DFS refferral mounting routines used for handling
+ *   traversal via DFS junction point
+ *
+ *   Copyright (c) 2007 Igor Mammedov
+ *   Author(s): Igor Mammedov ([email protected])
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version
+ *   2 of the License, or (at your option) any later version.
+ */
+
+#ifndef _CIFS_DFS_REF_H
+#define _CIFS_DFS_REF_H
+
+extern struct list_head cifs_dfs_automount_list;
+extern struct inode_operations cifs_dfs_referral_inode_operations;
+#ifdef CONFIG_CIFS_DFS_UPCALL
+void dfs_shrink_umount_helper(struct vfsmount *vfsmnt);
+
+#else /* stubs section */
+
+#define dfs_shrink_umount_helper(vfsmnt)
+
+#endif /* CONFIG_CIFS_DFS_UPCALL */
+
+#endif /* _CIFS_DFS_REF_H */
fs/cifs/cifsfs.c +3 -0
index 93e1078..1c6e5e9 100644
@@ -46,6 +46,7 @@
 #include <linux/key-type.h>
 #include "dns_resolve.h"
 #include "cifs_spnego.h"
+#include "cifs_dfs_ref.h"
 #define CIFS_MAGIC_NUMBER 0xFF534D42	/* the first four bytes of SMB PDUs */
 
 #ifdef CONFIG_CIFS_QUOTA
@@ -471,6 +472,8 @@ static void cifs_umount_begin(struct vfsmount *vfsmnt, int flags)
 	struct cifs_sb_info *cifs_sb;
 	struct cifsTconInfo *tcon;
 
+	dfs_shrink_umount_helper(vfsmnt);
+
 	if (!(flags & MNT_FORCE))
 		return;
 	cifs_sb = CIFS_SB(vfsmnt->mnt_sb);
Signature · 1 line
1.5.3.7