Commit 0fcf90eb authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] (9/9) more ->get_sb() stuff

More ->get_sb() patches: nfs.  It still acts as nodev - what we want to
(and can) do now is to give it enough smarts to recognize that same tree
might be already mounted.

We are almost done with nodev filesystems by now.
parent 0d265379
...@@ -245,8 +245,7 @@ nfs_get_root(struct super_block *sb, struct nfs_fh *rootfh) ...@@ -245,8 +245,7 @@ nfs_get_root(struct super_block *sb, struct nfs_fh *rootfh)
* and the root file handle obtained from the server's mount * and the root file handle obtained from the server's mount
* daemon. We stash these away in the private superblock fields. * daemon. We stash these away in the private superblock fields.
*/ */
struct super_block * int nfs_fill_super(struct super_block *sb, void *raw_data, int silent)
nfs_read_super(struct super_block *sb, void *raw_data, int silent)
{ {
struct nfs_mount_data *data = (struct nfs_mount_data *) raw_data; struct nfs_mount_data *data = (struct nfs_mount_data *) raw_data;
struct nfs_server *server; struct nfs_server *server;
...@@ -469,7 +468,7 @@ nfs_read_super(struct super_block *sb, void *raw_data, int silent) ...@@ -469,7 +468,7 @@ nfs_read_super(struct super_block *sb, void *raw_data, int silent)
/* Check whether to start the lockd process */ /* Check whether to start the lockd process */
if (!(server->flags & NFS_MOUNT_NONLM)) if (!(server->flags & NFS_MOUNT_NONLM))
lockd_up(); lockd_up();
return sb; return 0;
/* Yargs. It didn't work out. */ /* Yargs. It didn't work out. */
failure_kill_reqlist: failure_kill_reqlist:
...@@ -508,7 +507,7 @@ nfs_read_super(struct super_block *sb, void *raw_data, int silent) ...@@ -508,7 +507,7 @@ nfs_read_super(struct super_block *sb, void *raw_data, int silent)
printk("nfs_read_super: missing data argument\n"); printk("nfs_read_super: missing data argument\n");
out_fail: out_fail:
return NULL; return -EINVAL;
} }
static int static int
...@@ -1139,7 +1138,25 @@ __nfs_refresh_inode(struct inode *inode, struct nfs_fattr *fattr) ...@@ -1139,7 +1138,25 @@ __nfs_refresh_inode(struct inode *inode, struct nfs_fattr *fattr)
/* /*
* File system information * File system information
*/ */
static DECLARE_FSTYPE(nfs_fs_type, "nfs", nfs_read_super, FS_ODD_RENAME);
/*
* Right now we are using get_sb_nodev, but we ought to switch to
* get_anon_super() with appropriate comparison function. The only
* question being, when two NFS mounts are the same? Identical IP
* of server + identical root fhandle? Trond?
*/
static struct super_block *nfs_get_sb(struct file_system_type *fs_type,
int flags, char *dev_name, void *data)
{
return get_sb_nodev(fs_type, flags, data, nfs_fill_super);
}
static struct file_system_type nfs_fs_type = {
owner: THIS_MODULE,
name: "nfs",
get_sb: nfs_get_sb,
fs_flags: FS_ODD_RENAME,
};
extern int nfs_init_nfspagecache(void); extern int nfs_init_nfspagecache(void);
extern void nfs_destroy_nfspagecache(void); extern void nfs_destroy_nfspagecache(void);
......
...@@ -226,7 +226,6 @@ unsigned long page_index(struct page *page) ...@@ -226,7 +226,6 @@ unsigned long page_index(struct page *page)
/* /*
* linux/fs/nfs/inode.c * linux/fs/nfs/inode.c
*/ */
extern struct super_block *nfs_read_super(struct super_block *, void *, int);
extern void nfs_zap_caches(struct inode *); extern void nfs_zap_caches(struct inode *);
extern int nfs_inode_is_stale(struct inode *, struct nfs_fh *, extern int nfs_inode_is_stale(struct inode *, struct nfs_fh *,
struct nfs_fattr *); struct nfs_fattr *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment