Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320227
b: refs/heads/master
c: 597d928
h: refs/heads/master
i:
  320225: 6be3595
  320223: 0d9240a
v: v3
  • Loading branch information
Bryan Schumaker authored and Trond Myklebust committed Jul 17, 2012
1 parent 0b537cb commit b5f562a
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 43 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6bbb4ae8ffc4eef825c8742eff1fefae69a82e41
refs/heads/master: 597d92891b8859b4b4949fd08e25e60fc80ddaaf
43 changes: 9 additions & 34 deletions trunk/fs/nfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,6 @@
static int nfs_opendir(struct inode *, struct file *);
static int nfs_closedir(struct inode *, struct file *);
static int nfs_readdir(struct file *, void *, filldir_t);
static struct dentry *nfs_lookup(struct inode *, struct dentry *, unsigned int);
static int nfs_create(struct inode *, struct dentry *, umode_t, bool);
static int nfs_mkdir(struct inode *, struct dentry *, umode_t);
static int nfs_rmdir(struct inode *, struct dentry *);
static int nfs_unlink(struct inode *, struct dentry *);
static int nfs_symlink(struct inode *, struct dentry *, const char *);
static int nfs_link(struct dentry *, struct inode *, struct dentry *);
static int nfs_mknod(struct inode *, struct dentry *, umode_t, dev_t);
static int nfs_rename(struct inode *, struct dentry *,
struct inode *, struct dentry *);
static int nfs_fsync_dir(struct file *, loff_t, loff_t, int);
static loff_t nfs_llseek_dir(struct file *, loff_t, int);
static void nfs_readdir_clear_array(struct page*);
Expand All @@ -69,21 +59,6 @@ const struct file_operations nfs_dir_operations = {
.fsync = nfs_fsync_dir,
};

const struct inode_operations nfs_dir_inode_operations = {
.create = nfs_create,
.lookup = nfs_lookup,
.link = nfs_link,
.unlink = nfs_unlink,
.symlink = nfs_symlink,
.mkdir = nfs_mkdir,
.rmdir = nfs_rmdir,
.mknod = nfs_mknod,
.rename = nfs_rename,
.permission = nfs_permission,
.getattr = nfs_getattr,
.setattr = nfs_setattr,
};

const struct address_space_operations nfs_dir_aops = {
.freepage = nfs_readdir_clear_array,
};
Expand Down Expand Up @@ -1270,7 +1245,7 @@ const struct dentry_operations nfs_dentry_operations = {
.d_release = nfs_d_release,
};

static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, unsigned int flags)
struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, unsigned int flags)
{
struct dentry *res;
struct dentry *parent;
Expand Down Expand Up @@ -1588,7 +1563,7 @@ int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fhandle,
* that the operation succeeded on the server, but an error in the
* reply path made it appear to have failed.
*/
static int nfs_create(struct inode *dir, struct dentry *dentry,
int nfs_create(struct inode *dir, struct dentry *dentry,
umode_t mode, bool excl)
{
struct iattr attr;
Expand All @@ -1613,7 +1588,7 @@ static int nfs_create(struct inode *dir, struct dentry *dentry,
/*
* See comments for nfs_proc_create regarding failed operations.
*/
static int
int
nfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t rdev)
{
struct iattr attr;
Expand All @@ -1640,7 +1615,7 @@ nfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t rdev)
/*
* See comments for nfs_proc_create regarding failed operations.
*/
static int nfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
int nfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{
struct iattr attr;
int error;
Expand All @@ -1666,7 +1641,7 @@ static void nfs_dentry_handle_enoent(struct dentry *dentry)
d_delete(dentry);
}

static int nfs_rmdir(struct inode *dir, struct dentry *dentry)
int nfs_rmdir(struct inode *dir, struct dentry *dentry)
{
int error;

Expand Down Expand Up @@ -1725,7 +1700,7 @@ static int nfs_safe_remove(struct dentry *dentry)
*
* If sillyrename() returns 0, we do nothing, otherwise we unlink.
*/
static int nfs_unlink(struct inode *dir, struct dentry *dentry)
int nfs_unlink(struct inode *dir, struct dentry *dentry)
{
int error;
int need_rehash = 0;
Expand Down Expand Up @@ -1769,7 +1744,7 @@ static int nfs_unlink(struct inode *dir, struct dentry *dentry)
* now have a new file handle and can instantiate an in-core NFS inode
* and move the raw page into its mapping.
*/
static int nfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname)
int nfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname)
{
struct pagevec lru_pvec;
struct page *page;
Expand Down Expand Up @@ -1824,7 +1799,7 @@ static int nfs_symlink(struct inode *dir, struct dentry *dentry, const char *sym
return 0;
}

static int
int
nfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry)
{
struct inode *inode = old_dentry->d_inode;
Expand Down Expand Up @@ -1869,7 +1844,7 @@ nfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry)
* If these conditions are met, we can drop the dentries before doing
* the rename.
*/
static int nfs_rename(struct inode *old_dir, struct dentry *old_dentry,
int nfs_rename(struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry)
{
struct inode *old_inode = old_dentry->d_inode;
Expand Down
6 changes: 0 additions & 6 deletions trunk/fs/nfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@

static const struct vm_operations_struct nfs_file_vm_ops;

const struct inode_operations nfs_file_inode_operations = {
.permission = nfs_permission,
.getattr = nfs_getattr,
.setattr = nfs_setattr,
};

#ifdef CONFIG_NFS_V3
const struct inode_operations nfs3_file_inode_operations = {
.permission = nfs_permission,
Expand Down
9 changes: 9 additions & 0 deletions trunk/fs/nfs/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,15 @@ extern struct nfs_client *nfs_init_client(struct nfs_client *clp,
/* dir.c */
extern int nfs_access_cache_shrinker(struct shrinker *shrink,
struct shrink_control *sc);
struct dentry *nfs_lookup(struct inode *, struct dentry *, unsigned int);
int nfs_create(struct inode *, struct dentry *, umode_t, bool);
int nfs_mkdir(struct inode *, struct dentry *, umode_t);
int nfs_rmdir(struct inode *, struct dentry *);
int nfs_unlink(struct inode *, struct dentry *);
int nfs_symlink(struct inode *, struct dentry *, const char *);
int nfs_link(struct dentry *, struct inode *, struct dentry *);
int nfs_mknod(struct inode *, struct dentry *, umode_t, dev_t);
int nfs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *);

/* inode.c */
extern struct workqueue_struct *nfsiod_workqueue;
Expand Down
21 changes: 21 additions & 0 deletions trunk/fs/nfs/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,27 @@ static int nfs_return_delegation(struct inode *inode)
return 0;
}

static const struct inode_operations nfs_dir_inode_operations = {
.create = nfs_create,
.lookup = nfs_lookup,
.link = nfs_link,
.unlink = nfs_unlink,
.symlink = nfs_symlink,
.mkdir = nfs_mkdir,
.rmdir = nfs_rmdir,
.mknod = nfs_mknod,
.rename = nfs_rename,
.permission = nfs_permission,
.getattr = nfs_getattr,
.setattr = nfs_setattr,
};

static const struct inode_operations nfs_file_inode_operations = {
.permission = nfs_permission,
.getattr = nfs_getattr,
.setattr = nfs_setattr,
};

const struct nfs_rpc_ops nfs_v2_clientops = {
.version = 2, /* protocol version */
.dentry_ops = &nfs_dentry_operations,
Expand Down
2 changes: 0 additions & 2 deletions trunk/include/linux/nfs_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,6 @@ extern __be32 root_nfs_parse_addr(char *name); /*__init*/
/*
* linux/fs/nfs/file.c
*/
extern const struct inode_operations nfs_file_inode_operations;
#ifdef CONFIG_NFS_V3
extern const struct inode_operations nfs3_file_inode_operations;
#endif /* CONFIG_NFS_V3 */
Expand Down Expand Up @@ -485,7 +484,6 @@ extern ssize_t nfs_file_direct_write(struct kiocb *iocb,
/*
* linux/fs/nfs/dir.c
*/
extern const struct inode_operations nfs_dir_inode_operations;
#ifdef CONFIG_NFS_V3
extern const struct inode_operations nfs3_dir_inode_operations;
#endif /* CONFIG_NFS_V3 */
Expand Down

0 comments on commit b5f562a

Please sign in to comment.