- fs/Makefile | 3
- fs/file_table.c | 11 ++
- fs/inode.c | 23 ++++-
- fs/namei.c | 12 ++
- fs/nfsd/nfsfh.c | 65 +++++++++++++-
- fs/nfsd/vfs.c | 240 ++++++++++++++++++++++++++++++++++++++++++++++++-----
- fs/super.c | 3
- include/linux/fs.h | 8 +
- kernel/ksyms.c | 3
- 9 files changed, 333 insertions(+), 35 deletions(-)
-
---- lum-2.4.20-l27/fs/Makefile~nfs_export_kernel-2.4.20 Thu Sep 25 03:31:17 2003
-+++ lum-2.4.20-l27-phil/fs/Makefile Thu Sep 25 03:30:18 2003
+diff -uprN linux/fs/Makefile linux-2.4.20/fs/Makefile
+--- linux/fs/Makefile Sun Oct 5 21:52:51 2003
++++ linux-2.4.20/fs/Makefile Sun Oct 5 21:47:45 2003
@@ -7,7 +7,8 @@
O_TARGET := fs.o
mod-subdirs := nls
obj-y := open.o read_write.o devices.o file_table.o buffer.o \
---- lum-2.4.20-l27/fs/file_table.c~nfs_export_kernel-2.4.20 Thu Nov 28 18:53:15 2002
-+++ lum-2.4.20-l27-phil/fs/file_table.c Thu Sep 25 03:25:12 2003
+diff -uprN linux/fs/file_table.c linux-2.4.20/fs/file_table.c
+--- linux/fs/file_table.c Fri Nov 29 05:23:15 2002
++++ linux-2.4.20/fs/file_table.c Sun Oct 5 21:47:45 2003
@@ -82,7 +82,8 @@ struct file * get_empty_filp(void)
* and call the open function (if any). The caller must verify that
* inode->i_fop is not NULL.
void fput(struct file * file)
{
---- lum-2.4.20-l27/fs/inode.c~nfs_export_kernel-2.4.20 Thu Sep 25 02:30:45 2003
-+++ lum-2.4.20-l27-phil/fs/inode.c Thu Sep 25 02:30:56 2003
+diff -uprN linux/fs/inode.c linux-2.4.20/fs/inode.c
+--- linux/fs/inode.c Sun Oct 5 21:52:49 2003
++++ linux-2.4.20/fs/inode.c Sun Oct 5 21:47:45 2003
@@ -970,9 +970,10 @@ struct inode *igrab(struct inode *inode)
}
/*
* get_new_inode() will do the right thing, re-trying the search
* in case it had to block at any point.
---- lum-2.4.20-l27/fs/namei.c~nfs_export_kernel-2.4.20 Thu Sep 25 02:30:45 2003
-+++ lum-2.4.20-l27-phil/fs/namei.c Thu Sep 25 03:48:58 2003
+diff -uprN linux/fs/namei.c linux-2.4.20/fs/namei.c
+--- linux/fs/namei.c Sun Oct 5 21:52:48 2003
++++ linux-2.4.20/fs/namei.c Sun Oct 5 21:47:45 2003
@@ -22,6 +22,7 @@
#include <linux/dnotify.h>
#include <linux/smp_lock.h>
/*
* namei()
*
---- lum-2.4.20-l27/fs/nfsd/nfsfh.c~nfs_export_kernel-2.4.20 Thu Nov 28 18:53:15 2002
-+++ lum-2.4.20-l27-phil/fs/nfsd/nfsfh.c Thu Sep 25 02:30:56 2003
+diff -uprN linux/fs/nfsd/export.c linux-2.4.20/fs/nfsd/export.c
+--- linux/fs/nfsd/export.c Fri Nov 29 05:23:15 2002
++++ linux-2.4.20/fs/nfsd/export.c Sun Oct 5 22:25:20 2003
+@@ -222,6 +222,11 @@ exp_export(struct nfsctl_export *nxp)
+ inode = nd.dentry->d_inode;
+ dev = inode->i_dev;
+ ino = inode->i_ino;
++ if ((inode->i_sb->s_type->fs_flags & FS_NFSEXP_FSID) &&
++ !(nxp->ex_flags & NFSEXP_FSID)) {
++ nxp->ex_dev = inode->i_sb->s_dev;
++ nxp->ex_flags |= NFSEXP_FSID;
++ }
+ err = -EINVAL;
+
+ exp = exp_get(clp, dev, ino);
+diff -uprN linux/fs/nfsd/nfsfh.c linux-2.4.20/fs/nfsd/nfsfh.c
+--- linux/fs/nfsd/nfsfh.c Fri Nov 29 05:23:15 2002
++++ linux-2.4.20/fs/nfsd/nfsfh.c Sun Oct 5 21:47:45 2003
@@ -36,6 +36,15 @@ struct nfsd_getdents_callback {
int sequence; /* sequence counter */
};
goto out;
}
---- lum-2.4.20-l27/fs/nfsd/vfs.c~nfs_export_kernel-2.4.20 Thu Nov 28 18:53:15 2002
-+++ lum-2.4.20-l27-phil/fs/nfsd/vfs.c Thu Sep 25 03:05:28 2003
+diff -uprN linux/fs/nfsd/vfs.c linux-2.4.20/fs/nfsd/vfs.c
+--- linux/fs/nfsd/vfs.c Fri Nov 29 05:23:15 2002
++++ linux-2.4.20/fs/nfsd/vfs.c Sun Oct 5 21:47:45 2003
@@ -77,6 +77,128 @@ struct raparms {
static struct raparms * raparml;
static struct raparms * raparm_cache;
}
dput(rdentry);
---- lum-2.4.20-l27/fs/super.c~nfs_export_kernel-2.4.20 Thu Sep 25 02:30:45 2003
-+++ lum-2.4.20-l27-phil/fs/super.c Thu Sep 25 02:30:56 2003
-@@ -27,6 +27,7 @@
- #include <linux/devfs_fs_kernel.h>
- #include <linux/major.h>
- #include <linux/acct.h>
-+#include <linux/fs.h>
-
- #include <asm/uaccess.h>
-
-@@ -51,7 +52,7 @@ spinlock_t sb_lock = SPIN_LOCK_UNLOCKED;
- */
-
- static struct file_system_type *file_systems;
--static rwlock_t file_systems_lock = RW_LOCK_UNLOCKED;
-+rwlock_t file_systems_lock = RW_LOCK_UNLOCKED;
-
- /* WARNING: This can be used only if we _already_ own a reference */
- static void get_filesystem(struct file_system_type *fs)
---- lum-2.4.20-l27/include/linux/fs.h~nfs_export_kernel-2.4.20 Thu Sep 25 02:30:55 2003
-+++ lum-2.4.20-l27-phil/include/linux/fs.h Thu Sep 25 03:25:37 2003
-@@ -1098,6 +1098,9 @@ extern int open_namei_it(const char *fil
+diff -uprN linux/include/linux/fs.h linux-2.4.20/include/linux/fs.h
+--- linux/include/linux/fs.h Sun Oct 5 21:52:56 2003
++++ linux-2.4.20/include/linux/fs.h Sun Oct 5 22:25:20 2003
+@@ -93,6 +93,9 @@ extern int leases_enable, dir_notify_ena
+ #define FS_SINGLE 8 /* Filesystem that can have only one superblock */
+ #define FS_NOMOUNT 16 /* Never mount from userland */
+ #define FS_LITTER 32 /* Keeps the tree in dcache */
++#define FS_NFSEXP_FSID 64 /* Use file system specific fsid for
++ * exporting non device filesystems.
++ */
+ #define FS_ODD_RENAME 32768 /* Temporary stuff; will go away as soon
+ * as nfs_rename() will be cleaned up
+ */
+@@ -1099,6 +1102,9 @@ extern int open_namei_it(const char *fil
struct nameidata *nd, struct lookup_intent *it);
extern struct file *dentry_open_it(struct dentry *dentry, struct vfsmount *mnt,
int flags, struct lookup_intent *it);
extern int filp_close(struct file *, fl_owner_t id);
extern char * getname(const char *);
-@@ -1368,6 +1371,8 @@ extern void path_release(struct nameidat
+@@ -1369,6 +1375,8 @@ extern void path_release(struct nameidat
extern int follow_down(struct vfsmount **, struct dentry **);
extern int follow_up(struct vfsmount **, struct dentry **);
extern struct dentry * lookup_one_len(const char *, struct dentry *, int);
extern struct dentry * lookup_hash(struct qstr *, struct dentry *);
#define user_path_walk(name,nd) __user_walk(name, LOOKUP_FOLLOW|LOOKUP_POSITIVE, nd)
#define user_path_walk_link(name,nd) __user_walk(name, LOOKUP_POSITIVE, nd)
-@@ -1381,6 +1386,8 @@ extern ino_t iunique(struct super_block
+@@ -1382,6 +1390,8 @@ extern ino_t iunique(struct super_block
typedef int (*find_inode_t)(struct inode *, unsigned long, void *);
extern struct inode * iget4(struct super_block *, unsigned long, find_inode_t, void *);
static inline struct inode *iget(struct super_block *sb, unsigned long ino)
{
return iget4(sb, ino, NULL, NULL);
-@@ -1496,6 +1503,7 @@ extern int dcache_dir_fsync(struct file
- extern int dcache_readdir(struct file *, void *, filldir_t);
- extern struct file_operations dcache_dir_ops;
-
-+extern rwlock_t file_systems_lock;
- extern struct file_system_type *get_fs_type(const char *name);
- extern struct super_block *get_super(kdev_t);
- extern void drop_super(struct super_block *sb);
---- lum-2.4.20-l27/kernel/ksyms.c~nfs_export_kernel-2.4.20 Thu Sep 25 02:30:49 2003
-+++ lum-2.4.20-l27-phil/kernel/ksyms.c Thu Sep 25 02:30:56 2003
+diff -uprN linux/kernel/ksyms.c linux-2.4.20/kernel/ksyms.c
+--- linux/kernel/ksyms.c Sun Oct 5 21:52:51 2003
++++ linux-2.4.20/kernel/ksyms.c Sun Oct 5 22:25:20 2003
@@ -146,6 +146,7 @@ EXPORT_SYMBOL(fget);
EXPORT_SYMBOL(igrab);
EXPORT_SYMBOL(iunique);
EXPORT_SYMBOL(lookup_hash);
EXPORT_SYMBOL(sys_close);
EXPORT_SYMBOL(dcache_lock);
-@@ -590,3 +592,4 @@ EXPORT_SYMBOL(pidhash);
-
- /* debug */
- EXPORT_SYMBOL(dump_stack);
-+EXPORT_SYMBOL(file_systems_lock);
-
-_