Commit af692bd6 authored by Art Haas's avatar Art Haas Committed by Linus Torvalds

[PATCH] designated initializer patches for fs_nfs

  Here are some patches for C99 initializers in fs/nfs. Patches
  are against 2.5.32.
parent a541bd3a
...@@ -50,25 +50,25 @@ static int nfs_rename(struct inode *, struct dentry *, ...@@ -50,25 +50,25 @@ static int nfs_rename(struct inode *, struct dentry *,
struct inode *, struct dentry *); struct inode *, struct dentry *);
struct file_operations nfs_dir_operations = { struct file_operations nfs_dir_operations = {
read: generic_read_dir, .read = generic_read_dir,
readdir: nfs_readdir, .readdir = nfs_readdir,
open: nfs_open, .open = nfs_open,
release: nfs_release, .release = nfs_release,
}; };
struct inode_operations nfs_dir_inode_operations = { struct inode_operations nfs_dir_inode_operations = {
create: nfs_create, .create = nfs_create,
lookup: nfs_lookup, .lookup = nfs_lookup,
link: nfs_link, .link = nfs_link,
unlink: nfs_unlink, .unlink = nfs_unlink,
symlink: nfs_symlink, .symlink = nfs_symlink,
mkdir: nfs_mkdir, .mkdir = nfs_mkdir,
rmdir: nfs_rmdir, .rmdir = nfs_rmdir,
mknod: nfs_mknod, .mknod = nfs_mknod,
rename: nfs_rename, .rename = nfs_rename,
permission: nfs_permission, .permission = nfs_permission,
getattr: nfs_getattr, .getattr = nfs_getattr,
setattr: nfs_setattr, .setattr = nfs_setattr,
}; };
typedef u32 * (*decode_dirent_t)(u32 *, struct nfs_entry *, int); typedef u32 * (*decode_dirent_t)(u32 *, struct nfs_entry *, int);
...@@ -607,9 +607,9 @@ static void nfs_dentry_iput(struct dentry *dentry, struct inode *inode) ...@@ -607,9 +607,9 @@ static void nfs_dentry_iput(struct dentry *dentry, struct inode *inode)
} }
struct dentry_operations nfs_dentry_operations = { struct dentry_operations nfs_dentry_operations = {
d_revalidate: nfs_lookup_revalidate, .d_revalidate = nfs_lookup_revalidate,
d_delete: nfs_dentry_delete, .d_delete = nfs_dentry_delete,
d_iput: nfs_dentry_iput, .d_iput = nfs_dentry_iput,
}; };
static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry) static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry)
......
...@@ -41,21 +41,21 @@ static int nfs_file_flush(struct file *); ...@@ -41,21 +41,21 @@ static int nfs_file_flush(struct file *);
static int nfs_fsync(struct file *, struct dentry *dentry, int datasync); static int nfs_fsync(struct file *, struct dentry *dentry, int datasync);
struct file_operations nfs_file_operations = { struct file_operations nfs_file_operations = {
llseek: remote_llseek, .llseek = remote_llseek,
read: nfs_file_read, .read = nfs_file_read,
write: nfs_file_write, .write = nfs_file_write,
mmap: nfs_file_mmap, .mmap = nfs_file_mmap,
open: nfs_open, .open = nfs_open,
flush: nfs_file_flush, .flush = nfs_file_flush,
release: nfs_release, .release = nfs_release,
fsync: nfs_fsync, .fsync = nfs_fsync,
lock: nfs_lock, .lock = nfs_lock,
}; };
struct inode_operations nfs_file_inode_operations = { struct inode_operations nfs_file_inode_operations = {
permission: nfs_permission, .permission = nfs_permission,
getattr: nfs_getattr, .getattr = nfs_getattr,
setattr: nfs_setattr, .setattr = nfs_setattr,
}; };
/* Hack for future NFS swap support */ /* Hack for future NFS swap support */
...@@ -195,11 +195,11 @@ static int nfs_sync_page(struct page *page) ...@@ -195,11 +195,11 @@ static int nfs_sync_page(struct page *page)
} }
struct address_space_operations nfs_file_aops = { struct address_space_operations nfs_file_aops = {
readpage: nfs_readpage, .readpage = nfs_readpage,
sync_page: nfs_sync_page, .sync_page = nfs_sync_page,
writepage: nfs_writepage, .writepage = nfs_writepage,
prepare_write: nfs_prepare_write, .prepare_write = nfs_prepare_write,
commit_write: nfs_commit_write .commit_write = nfs_commit_write
}; };
/* /*
......
...@@ -55,22 +55,22 @@ static int nfs_statfs(struct super_block *, struct statfs *); ...@@ -55,22 +55,22 @@ static int nfs_statfs(struct super_block *, struct statfs *);
static int nfs_show_options(struct seq_file *, struct vfsmount *); static int nfs_show_options(struct seq_file *, struct vfsmount *);
static struct super_operations nfs_sops = { static struct super_operations nfs_sops = {
alloc_inode: nfs_alloc_inode, .alloc_inode = nfs_alloc_inode,
destroy_inode: nfs_destroy_inode, .destroy_inode = nfs_destroy_inode,
write_inode: nfs_write_inode, .write_inode = nfs_write_inode,
delete_inode: nfs_delete_inode, .delete_inode = nfs_delete_inode,
put_super: nfs_put_super, .put_super = nfs_put_super,
statfs: nfs_statfs, .statfs = nfs_statfs,
clear_inode: nfs_clear_inode, .clear_inode = nfs_clear_inode,
umount_begin: nfs_umount_begin, .umount_begin = nfs_umount_begin,
show_options: nfs_show_options, .show_options = nfs_show_options,
}; };
/* /*
* RPC cruft for NFS * RPC cruft for NFS
*/ */
struct rpc_stat nfs_rpcstat = { struct rpc_stat nfs_rpcstat = {
program: &nfs_program .program = &nfs_program
}; };
static struct rpc_version * nfs_version[] = { static struct rpc_version * nfs_version[] = {
NULL, NULL,
...@@ -82,11 +82,11 @@ static struct rpc_version * nfs_version[] = { ...@@ -82,11 +82,11 @@ static struct rpc_version * nfs_version[] = {
}; };
struct rpc_program nfs_program = { struct rpc_program nfs_program = {
name: "nfs", .name = "nfs",
number: NFS_PROGRAM, .number = NFS_PROGRAM,
nrvers: sizeof(nfs_version) / sizeof(nfs_version[0]), .nrvers = sizeof(nfs_version) / sizeof(nfs_version[0]),
version: nfs_version, .version = nfs_version,
stats: &nfs_rpcstat, .stats = &nfs_rpcstat,
}; };
static inline unsigned long static inline unsigned long
...@@ -654,8 +654,8 @@ static struct inode * ...@@ -654,8 +654,8 @@ static struct inode *
__nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr) __nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr)
{ {
struct nfs_find_desc desc = { struct nfs_find_desc desc = {
fh: fh, .fh = fh,
fattr: fattr .fattr = fattr
}; };
struct inode *inode = NULL; struct inode *inode = NULL;
unsigned long hash; unsigned long hash;
...@@ -1261,11 +1261,11 @@ static void nfs_kill_super(struct super_block *s) ...@@ -1261,11 +1261,11 @@ static void nfs_kill_super(struct super_block *s)
} }
static struct file_system_type nfs_fs_type = { static struct file_system_type nfs_fs_type = {
owner: THIS_MODULE, .owner = THIS_MODULE,
name: "nfs", .name = "nfs",
get_sb: nfs_get_sb, .get_sb = nfs_get_sb,
kill_sb: nfs_kill_super, .kill_sb = nfs_kill_super,
fs_flags: FS_ODD_RENAME, .fs_flags = FS_ODD_RENAME,
}; };
extern int nfs_init_nfspagecache(void); extern int nfs_init_nfspagecache(void);
......
...@@ -59,7 +59,7 @@ nfs_gen_mount(struct sockaddr_in *addr, char *path, struct nfs_fh *fh, int versi ...@@ -59,7 +59,7 @@ nfs_gen_mount(struct sockaddr_in *addr, char *path, struct nfs_fh *fh, int versi
{ {
struct rpc_clnt *mnt_clnt; struct rpc_clnt *mnt_clnt;
struct mnt_fhstatus result = { struct mnt_fhstatus result = {
fh: fh .fh = fh
}; };
char hostname[32]; char hostname[32];
int status; int status;
...@@ -152,40 +152,40 @@ xdr_decode_fhstatus3(struct rpc_rqst *req, u32 *p, struct mnt_fhstatus *res) ...@@ -152,40 +152,40 @@ xdr_decode_fhstatus3(struct rpc_rqst *req, u32 *p, struct mnt_fhstatus *res)
#define MNT_fhstatus_sz (1 + 8) #define MNT_fhstatus_sz (1 + 8)
static struct rpc_procinfo mnt_procedures[2] = { static struct rpc_procinfo mnt_procedures[2] = {
{ p_procname: "mnt_null", { .p_procname = "mnt_null",
p_encode: (kxdrproc_t) xdr_error, .p_encode = (kxdrproc_t) xdr_error,
p_decode: (kxdrproc_t) xdr_error, .p_decode = (kxdrproc_t) xdr_error,
}, },
{ p_procname: "mnt_mount", { .p_procname = "mnt_mount",
p_encode: (kxdrproc_t) xdr_encode_dirpath, .p_encode = (kxdrproc_t) xdr_encode_dirpath,
p_decode: (kxdrproc_t) xdr_decode_fhstatus, .p_decode = (kxdrproc_t) xdr_decode_fhstatus,
p_bufsiz: MNT_dirpath_sz << 2, .p_bufsiz = MNT_dirpath_sz << 2,
}, },
}; };
static struct rpc_procinfo mnt3_procedures[2] = { static struct rpc_procinfo mnt3_procedures[2] = {
{ p_procname: "mnt3_null", { .p_procname = "mnt3_null",
p_encode: (kxdrproc_t) xdr_error, .p_encode = (kxdrproc_t) xdr_error,
p_decode: (kxdrproc_t) xdr_error, .p_decode = (kxdrproc_t) xdr_error,
}, },
{ p_procname: "mnt3_mount", { .p_procname = "mnt3_mount",
p_encode: (kxdrproc_t) xdr_encode_dirpath, .p_encode = (kxdrproc_t) xdr_encode_dirpath,
p_decode: (kxdrproc_t) xdr_decode_fhstatus3, .p_decode = (kxdrproc_t) xdr_decode_fhstatus3,
p_bufsiz: MNT_dirpath_sz << 2, .p_bufsiz = MNT_dirpath_sz << 2,
}, },
}; };
static struct rpc_version mnt_version1 = { static struct rpc_version mnt_version1 = {
number: 1, .number = 1,
nrprocs: 2, .nrprocs = 2,
procs: mnt_procedures .procs = mnt_procedures
}; };
static struct rpc_version mnt_version3 = { static struct rpc_version mnt_version3 = {
number: 3, .number = 3,
nrprocs: 2, .nrprocs = 2,
procs: mnt3_procedures .procs = mnt3_procedures
}; };
static struct rpc_version * mnt_version[] = { static struct rpc_version * mnt_version[] = {
...@@ -198,9 +198,9 @@ static struct rpc_version * mnt_version[] = { ...@@ -198,9 +198,9 @@ static struct rpc_version * mnt_version[] = {
static struct rpc_stat mnt_stats; static struct rpc_stat mnt_stats;
struct rpc_program mnt_program = { struct rpc_program mnt_program = {
name: "mount", .name = "mount",
number: NFS_MNT_PROGRAM, .number = NFS_MNT_PROGRAM,
nrvers: sizeof(mnt_version)/sizeof(mnt_version[0]), .nrvers = sizeof(mnt_version)/sizeof(mnt_version[0]),
version: mnt_version, .version = mnt_version,
stats: &mnt_stats, .stats = &mnt_stats,
}; };
...@@ -724,7 +724,7 @@ static struct rpc_procinfo nfs_procedures[18] = { ...@@ -724,7 +724,7 @@ static struct rpc_procinfo nfs_procedures[18] = {
}; };
struct rpc_version nfs_version2 = { struct rpc_version nfs_version2 = {
number: 2, .number = 2,
nrprocs: sizeof(nfs_procedures)/sizeof(nfs_procedures[0]), .nrprocs = sizeof(nfs_procedures)/sizeof(nfs_procedures[0]),
procs: nfs_procedures .procs = nfs_procedures
}; };
...@@ -41,9 +41,9 @@ static inline int ...@@ -41,9 +41,9 @@ static inline int
nfs3_rpc_call_wrapper(struct rpc_clnt *clnt, u32 proc, void *argp, void *resp, int flags) nfs3_rpc_call_wrapper(struct rpc_clnt *clnt, u32 proc, void *argp, void *resp, int flags)
{ {
struct rpc_message msg = { struct rpc_message msg = {
rpc_proc: proc, .rpc_proc = proc,
rpc_argp: argp, .rpc_argp = argp,
rpc_resp: resp, .rpc_resp = resp,
}; };
return nfs3_rpc_wrapper(clnt, &msg, flags); return nfs3_rpc_wrapper(clnt, &msg, flags);
} }
...@@ -90,8 +90,8 @@ nfs3_proc_setattr(struct inode *inode, struct nfs_fattr *fattr, ...@@ -90,8 +90,8 @@ nfs3_proc_setattr(struct inode *inode, struct nfs_fattr *fattr,
struct iattr *sattr) struct iattr *sattr)
{ {
struct nfs3_sattrargs arg = { struct nfs3_sattrargs arg = {
fh: NFS_FH(inode), .fh = NFS_FH(inode),
sattr: sattr, .sattr = sattr,
}; };
int status; int status;
...@@ -108,14 +108,14 @@ nfs3_proc_lookup(struct inode *dir, struct qstr *name, ...@@ -108,14 +108,14 @@ nfs3_proc_lookup(struct inode *dir, struct qstr *name,
{ {
struct nfs_fattr dir_attr; struct nfs_fattr dir_attr;
struct nfs3_diropargs arg = { struct nfs3_diropargs arg = {
fh: NFS_FH(dir), .fh = NFS_FH(dir),
name: name->name, .name = name->name,
len: name->len .len = name->len
}; };
struct nfs3_diropres res = { struct nfs3_diropres res = {
dir_attr: &dir_attr, .dir_attr = &dir_attr,
fh: fhandle, .fh = fhandle,
fattr: fattr .fattr = fattr
}; };
int status; int status;
...@@ -180,9 +180,9 @@ nfs3_proc_readlink(struct inode *inode, struct page *page) ...@@ -180,9 +180,9 @@ nfs3_proc_readlink(struct inode *inode, struct page *page)
{ {
struct nfs_fattr fattr; struct nfs_fattr fattr;
struct nfs3_readlinkargs args = { struct nfs3_readlinkargs args = {
fh: NFS_FH(inode), .fh = NFS_FH(inode),
count: PAGE_CACHE_SIZE, .count = PAGE_CACHE_SIZE,
pages: &page .pages = &page
}; };
int status; int status;
...@@ -203,21 +203,21 @@ nfs3_proc_read(struct inode *inode, struct rpc_cred *cred, ...@@ -203,21 +203,21 @@ nfs3_proc_read(struct inode *inode, struct rpc_cred *cred,
{ {
u64 offset = page_offset(page) + base; u64 offset = page_offset(page) + base;
struct nfs_readargs arg = { struct nfs_readargs arg = {
fh: NFS_FH(inode), .fh = NFS_FH(inode),
offset: offset, .offset = offset,
count: count, .count = count,
pgbase: base, .pgbase = base,
pages: &page .pages = &page
}; };
struct nfs_readres res = { struct nfs_readres res = {
fattr: fattr, .fattr = fattr,
count: count, .count = count,
}; };
struct rpc_message msg = { struct rpc_message msg = {
rpc_proc: NFS3PROC_READ, .rpc_proc = NFS3PROC_READ,
rpc_argp: &arg, .rpc_argp = &arg,
rpc_resp: &res, .rpc_resp = &res,
rpc_cred: cred .rpc_cred = cred
}; };
int status; int status;
...@@ -237,22 +237,22 @@ nfs3_proc_write(struct inode *inode, struct rpc_cred *cred, ...@@ -237,22 +237,22 @@ nfs3_proc_write(struct inode *inode, struct rpc_cred *cred,
{ {
u64 offset = page_offset(page) + base; u64 offset = page_offset(page) + base;
struct nfs_writeargs arg = { struct nfs_writeargs arg = {
fh: NFS_FH(inode), .fh = NFS_FH(inode),
offset: offset, .offset = offset,
count: count, .count = count,
stable: NFS_FILE_SYNC, .stable = NFS_FILE_SYNC,
pgbase: base, .pgbase = base,
pages: &page .pages = &page
}; };
struct nfs_writeres res = { struct nfs_writeres res = {
fattr: fattr, .fattr = fattr,
verf: verf, .verf = verf,
}; };
struct rpc_message msg = { struct rpc_message msg = {
rpc_proc: NFS3PROC_WRITE, .rpc_proc = NFS3PROC_WRITE,
rpc_argp: &arg, .rpc_argp = &arg,
rpc_resp: &res, .rpc_resp = &res,
rpc_cred: cred .rpc_cred = cred
}; };
int status, rpcflags = 0; int status, rpcflags = 0;
...@@ -278,15 +278,15 @@ nfs3_proc_create(struct inode *dir, struct qstr *name, struct iattr *sattr, ...@@ -278,15 +278,15 @@ nfs3_proc_create(struct inode *dir, struct qstr *name, struct iattr *sattr,
{ {
struct nfs_fattr dir_attr; struct nfs_fattr dir_attr;
struct nfs3_createargs arg = { struct nfs3_createargs arg = {
fh: NFS_FH(dir), .fh = NFS_FH(dir),
name: name->name, .name = name->name,
len: name->len, .len = name->len,
sattr: sattr, .sattr = sattr,
}; };
struct nfs3_diropres res = { struct nfs3_diropres res = {
dir_attr: &dir_attr, .dir_attr = &dir_attr,
fh: fhandle, .fh = fhandle,
fattr: fattr .fattr = fattr
}; };
int status; int status;
...@@ -329,8 +329,8 @@ nfs3_proc_create(struct inode *dir, struct qstr *name, struct iattr *sattr, ...@@ -329,8 +329,8 @@ nfs3_proc_create(struct inode *dir, struct qstr *name, struct iattr *sattr,
* sure we set the attributes afterwards. */ * sure we set the attributes afterwards. */
if (status == 0 && arg.createmode == NFS3_CREATE_EXCLUSIVE) { if (status == 0 && arg.createmode == NFS3_CREATE_EXCLUSIVE) {
struct nfs3_sattrargs arg = { struct nfs3_sattrargs arg = {
fh: fhandle, .fh = fhandle,
sattr: sattr, .sattr = sattr,
}; };
dprintk("NFS call setattr (post-create)\n"); dprintk("NFS call setattr (post-create)\n");
...@@ -351,14 +351,14 @@ nfs3_proc_remove(struct inode *dir, struct qstr *name) ...@@ -351,14 +351,14 @@ nfs3_proc_remove(struct inode *dir, struct qstr *name)
{ {
struct nfs_fattr dir_attr; struct nfs_fattr dir_attr;
struct nfs3_diropargs arg = { struct nfs3_diropargs arg = {
fh: NFS_FH(dir), .fh = NFS_FH(dir),
name: name->name, .name = name->name,
len: name->len .len = name->len
}; };
struct rpc_message msg = { struct rpc_message msg = {
rpc_proc: NFS3PROC_REMOVE, .rpc_proc = NFS3PROC_REMOVE,
rpc_argp: &arg, .rpc_argp = &arg,
rpc_resp: &dir_attr, .rpc_resp = &dir_attr,
}; };
int status; int status;
...@@ -408,16 +408,16 @@ nfs3_proc_rename(struct inode *old_dir, struct qstr *old_name, ...@@ -408,16 +408,16 @@ nfs3_proc_rename(struct inode *old_dir, struct qstr *old_name,
{ {
struct nfs_fattr old_dir_attr, new_dir_attr; struct nfs_fattr old_dir_attr, new_dir_attr;
struct nfs3_renameargs arg = { struct nfs3_renameargs arg = {
fromfh: NFS_FH(old_dir), .fromfh = NFS_FH(old_dir),
fromname: old_name->name, .fromname = old_name->name,
fromlen: old_name->len, .fromlen = old_name->len,
tofh: NFS_FH(new_dir), .tofh = NFS_FH(new_dir),
toname: new_name->name, .toname = new_name->name,
tolen: new_name->len .tolen = new_name->len
}; };
struct nfs3_renameres res = { struct nfs3_renameres res = {
fromattr: &old_dir_attr, .fromattr = &old_dir_attr,
toattr: &new_dir_attr .toattr = &new_dir_attr
}; };
int status; int status;
...@@ -436,14 +436,14 @@ nfs3_proc_link(struct inode *inode, struct inode *dir, struct qstr *name) ...@@ -436,14 +436,14 @@ nfs3_proc_link(struct inode *inode, struct inode *dir, struct qstr *name)
{ {
struct nfs_fattr dir_attr, fattr; struct nfs_fattr dir_attr, fattr;
struct nfs3_linkargs arg = { struct nfs3_linkargs arg = {
fromfh: NFS_FH(inode), .fromfh = NFS_FH(inode),
tofh: NFS_FH(dir), .tofh = NFS_FH(dir),
toname: name->name, .toname = name->name,
tolen: name->len .tolen = name->len
}; };
struct nfs3_linkres res = { struct nfs3_linkres res = {
dir_attr: &dir_attr, .dir_attr = &dir_attr,
fattr: &fattr .fattr = &fattr
}; };
int status; int status;
...@@ -464,17 +464,17 @@ nfs3_proc_symlink(struct inode *dir, struct qstr *name, struct qstr *path, ...@@ -464,17 +464,17 @@ nfs3_proc_symlink(struct inode *dir, struct qstr *name, struct qstr *path,
{ {
struct nfs_fattr dir_attr; struct nfs_fattr dir_attr;
struct nfs3_symlinkargs arg = { struct nfs3_symlinkargs arg = {
fromfh: NFS_FH(dir), .fromfh = NFS_FH(dir),
fromname: name->name, .fromname = name->name,
fromlen: name->len, .fromlen = name->len,
topath: path->name, .topath = path->name,
tolen: path->len, .tolen = path->len,
sattr: sattr .sattr = sattr
}; };
struct nfs3_diropres res = { struct nfs3_diropres res = {
dir_attr: &dir_attr, .dir_attr = &dir_attr,
fh: fhandle, .fh = fhandle,
fattr: fattr .fattr = fattr
}; };
int status; int status;
...@@ -493,15 +493,15 @@ nfs3_proc_mkdir(struct inode *dir, struct qstr *name, struct iattr *sattr, ...@@ -493,15 +493,15 @@ nfs3_proc_mkdir(struct inode *dir, struct qstr *name, struct iattr *sattr,
{ {
struct nfs_fattr dir_attr; struct nfs_fattr dir_attr;
struct nfs3_mkdirargs arg = { struct nfs3_mkdirargs arg = {
fh: NFS_FH(dir), .fh = NFS_FH(dir),
name: name->name, .name = name->name,
len: name->len, .len = name->len,
sattr: sattr .sattr = sattr
}; };
struct nfs3_diropres res = { struct nfs3_diropres res = {
dir_attr: &dir_attr, .dir_attr = &dir_attr,
fh: fhandle, .fh = fhandle,
fattr: fattr .fattr = fattr
}; };
int status; int status;
...@@ -519,9 +519,9 @@ nfs3_proc_rmdir(struct inode *dir, struct qstr *name) ...@@ -519,9 +519,9 @@ nfs3_proc_rmdir(struct inode *dir, struct qstr *name)
{ {
struct nfs_fattr dir_attr; struct nfs_fattr dir_attr;
struct nfs3_diropargs arg = { struct nfs3_diropargs arg = {
fh: NFS_FH(dir), .fh = NFS_FH(dir),
name: name->name, .name = name->name,
len: name->len .len = name->len
}; };
int status; int status;
...@@ -549,23 +549,23 @@ nfs3_proc_readdir(struct inode *dir, struct rpc_cred *cred, ...@@ -549,23 +549,23 @@ nfs3_proc_readdir(struct inode *dir, struct rpc_cred *cred,
struct nfs_fattr dir_attr; struct nfs_fattr dir_attr;
u32 *verf = NFS_COOKIEVERF(dir); u32 *verf = NFS_COOKIEVERF(dir);
struct nfs3_readdirargs arg = { struct nfs3_readdirargs arg = {
fh: NFS_FH(dir), .fh = NFS_FH(dir),
cookie: cookie, .cookie = cookie,
verf: {verf[0], verf[1]}, .verf = {verf[0], verf[1]},
plus: plus, .plus = plus,
count: count, .count = count,
pages: &page .pages = &page
}; };
struct nfs3_readdirres res = { struct nfs3_readdirres res = {
dir_attr: &dir_attr, .dir_attr = &dir_attr,
verf: verf, .verf = verf,
plus: plus .plus = plus
}; };
struct rpc_message msg = { struct rpc_message msg = {
rpc_proc: NFS3PROC_READDIR, .rpc_proc = NFS3PROC_READDIR,
rpc_argp: &arg, .rpc_argp = &arg,
rpc_resp: &res, .rpc_resp = &res,
rpc_cred: cred .rpc_cred = cred
}; };
int status; int status;
...@@ -591,16 +591,16 @@ nfs3_proc_mknod(struct inode *dir, struct qstr *name, struct iattr *sattr, ...@@ -591,16 +591,16 @@ nfs3_proc_mknod(struct inode *dir, struct qstr *name, struct iattr *sattr,
{ {
struct nfs_fattr dir_attr; struct nfs_fattr dir_attr;
struct nfs3_mknodargs arg = { struct nfs3_mknodargs arg = {
fh: NFS_FH(dir), .fh = NFS_FH(dir),
name: name->name, .name = name->name,
len: name->len, .len = name->len,
sattr: sattr, .sattr = sattr,
rdev: rdev .rdev = rdev
}; };
struct nfs3_diropres res = { struct nfs3_diropres res = {
dir_attr: &dir_attr, .dir_attr = &dir_attr,
fh: fh, .fh = fh,
fattr: fattr .fattr = fattr
}; };
int status; int status;
...@@ -645,26 +645,26 @@ nfs3_proc_statfs(struct nfs_server *server, struct nfs_fh *fhandle, ...@@ -645,26 +645,26 @@ nfs3_proc_statfs(struct nfs_server *server, struct nfs_fh *fhandle,
extern u32 *nfs3_decode_dirent(u32 *, struct nfs_entry *, int); extern u32 *nfs3_decode_dirent(u32 *, struct nfs_entry *, int);
struct nfs_rpc_ops nfs_v3_clientops = { struct nfs_rpc_ops nfs_v3_clientops = {
version: 3, /* protocol version */ .version = 3, /* protocol version */
getroot: nfs3_proc_get_root, .getroot = nfs3_proc_get_root,
getattr: nfs3_proc_getattr, .getattr = nfs3_proc_getattr,
setattr: nfs3_proc_setattr, .setattr = nfs3_proc_setattr,
lookup: nfs3_proc_lookup, .lookup = nfs3_proc_lookup,
access: nfs3_proc_access, .access = nfs3_proc_access,
readlink: nfs3_proc_readlink, .readlink = nfs3_proc_readlink,
read: nfs3_proc_read, .read = nfs3_proc_read,
write: nfs3_proc_write, .write = nfs3_proc_write,
create: nfs3_proc_create, .create = nfs3_proc_create,
remove: nfs3_proc_remove, .remove = nfs3_proc_remove,
unlink_setup: nfs3_proc_unlink_setup, .unlink_setup = nfs3_proc_unlink_setup,
unlink_done: nfs3_proc_unlink_done, .unlink_done = nfs3_proc_unlink_done,
rename: nfs3_proc_rename, .rename = nfs3_proc_rename,
link: nfs3_proc_link, .link = nfs3_proc_link,
symlink: nfs3_proc_symlink, .symlink = nfs3_proc_symlink,
mkdir: nfs3_proc_mkdir, .mkdir = nfs3_proc_mkdir,
rmdir: nfs3_proc_rmdir, .rmdir = nfs3_proc_rmdir,
readdir: nfs3_proc_readdir, .readdir = nfs3_proc_readdir,
mknod: nfs3_proc_mknod, .mknod = nfs3_proc_mknod,
statfs: nfs3_proc_statfs, .statfs = nfs3_proc_statfs,
decode_dirent: nfs3_decode_dirent, .decode_dirent = nfs3_decode_dirent,
}; };
...@@ -1039,8 +1039,8 @@ static struct rpc_procinfo nfs3_procedures[22] = { ...@@ -1039,8 +1039,8 @@ static struct rpc_procinfo nfs3_procedures[22] = {
}; };
struct rpc_version nfs_version3 = { struct rpc_version nfs_version3 = {
number: 3, .number = 3,
nrprocs: sizeof(nfs3_procedures)/sizeof(nfs3_procedures[0]), .nrprocs = sizeof(nfs3_procedures)/sizeof(nfs3_procedures[0]),
procs: nfs3_procedures .procs = nfs3_procedures
}; };
...@@ -82,8 +82,8 @@ nfs_proc_setattr(struct inode *inode, struct nfs_fattr *fattr, ...@@ -82,8 +82,8 @@ nfs_proc_setattr(struct inode *inode, struct nfs_fattr *fattr,
struct iattr *sattr) struct iattr *sattr)
{ {
struct nfs_sattrargs arg = { struct nfs_sattrargs arg = {
fh: NFS_FH(inode), .fh = NFS_FH(inode),
sattr: sattr .sattr = sattr
}; };
int status; int status;
...@@ -99,13 +99,13 @@ nfs_proc_lookup(struct inode *dir, struct qstr *name, ...@@ -99,13 +99,13 @@ nfs_proc_lookup(struct inode *dir, struct qstr *name,
struct nfs_fh *fhandle, struct nfs_fattr *fattr) struct nfs_fh *fhandle, struct nfs_fattr *fattr)
{ {
struct nfs_diropargs arg = { struct nfs_diropargs arg = {
fh: NFS_FH(dir), .fh = NFS_FH(dir),
name: name->name, .name = name->name,
len: name->len .len = name->len
}; };
struct nfs_diropok res = { struct nfs_diropok res = {
fh: fhandle, .fh = fhandle,
fattr: fattr .fattr = fattr
}; };
int status; int status;
...@@ -120,9 +120,9 @@ static int ...@@ -120,9 +120,9 @@ static int
nfs_proc_readlink(struct inode *inode, struct page *page) nfs_proc_readlink(struct inode *inode, struct page *page)
{ {
struct nfs_readlinkargs args = { struct nfs_readlinkargs args = {
fh: NFS_FH(inode), .fh = NFS_FH(inode),
count: PAGE_CACHE_SIZE, .count = PAGE_CACHE_SIZE,
pages: &page .pages = &page
}; };
int status; int status;
...@@ -140,21 +140,21 @@ nfs_proc_read(struct inode *inode, struct rpc_cred *cred, ...@@ -140,21 +140,21 @@ nfs_proc_read(struct inode *inode, struct rpc_cred *cred,
{ {
u64 offset = page_offset(page) + base; u64 offset = page_offset(page) + base;
struct nfs_readargs arg = { struct nfs_readargs arg = {
fh: NFS_FH(inode), .fh = NFS_FH(inode),
offset: offset, .offset = offset,
count: count, .count = count,
pgbase: base, .pgbase = base,
pages: &page .pages = &page
}; };
struct nfs_readres res = { struct nfs_readres res = {
fattr: fattr, .fattr = fattr,
count: count .count = count
}; };
struct rpc_message msg = { struct rpc_message msg = {
rpc_proc: NFSPROC_READ, .rpc_proc = NFSPROC_READ,
rpc_argp: &arg, .rpc_argp = &arg,
rpc_resp: &res, .rpc_resp = &res,
rpc_cred: cred .rpc_cred = cred
}; };
int status; int status;
...@@ -175,23 +175,23 @@ nfs_proc_write(struct inode *inode, struct rpc_cred *cred, ...@@ -175,23 +175,23 @@ nfs_proc_write(struct inode *inode, struct rpc_cred *cred,
{ {
u64 offset = page_offset(page) + base; u64 offset = page_offset(page) + base;
struct nfs_writeargs arg = { struct nfs_writeargs arg = {
fh: NFS_FH(inode), .fh = NFS_FH(inode),
offset: offset, .offset = offset,
count: count, .count = count,
stable: NFS_FILE_SYNC, .stable = NFS_FILE_SYNC,
pgbase: base, .pgbase = base,
pages: &page .pages = &page
}; };
struct nfs_writeres res = { struct nfs_writeres res = {
fattr: fattr, .fattr = fattr,
verf: verf, .verf = verf,
count: count .count = count
}; };
struct rpc_message msg = { struct rpc_message msg = {
rpc_proc: NFSPROC_WRITE, .rpc_proc = NFSPROC_WRITE,
rpc_argp: &arg, .rpc_argp = &arg,
rpc_resp: &res, .rpc_resp = &res,
rpc_cred: cred .rpc_cred = cred
}; };
int status, flags = 0; int status, flags = 0;
...@@ -211,14 +211,14 @@ nfs_proc_create(struct inode *dir, struct qstr *name, struct iattr *sattr, ...@@ -211,14 +211,14 @@ nfs_proc_create(struct inode *dir, struct qstr *name, struct iattr *sattr,
int flags, struct nfs_fh *fhandle, struct nfs_fattr *fattr) int flags, struct nfs_fh *fhandle, struct nfs_fattr *fattr)
{ {
struct nfs_createargs arg = { struct nfs_createargs arg = {
fh: NFS_FH(dir), .fh = NFS_FH(dir),
name: name->name, .name = name->name,
len: name->len, .len = name->len,
sattr: sattr .sattr = sattr
}; };
struct nfs_diropok res = { struct nfs_diropok res = {
fh: fhandle, .fh = fhandle,
fattr: fattr .fattr = fattr
}; };
int status; int status;
...@@ -237,14 +237,14 @@ nfs_proc_mknod(struct inode *dir, struct qstr *name, struct iattr *sattr, ...@@ -237,14 +237,14 @@ nfs_proc_mknod(struct inode *dir, struct qstr *name, struct iattr *sattr,
dev_t rdev, struct nfs_fh *fhandle, struct nfs_fattr *fattr) dev_t rdev, struct nfs_fh *fhandle, struct nfs_fattr *fattr)
{ {
struct nfs_createargs arg = { struct nfs_createargs arg = {
fh: NFS_FH(dir), .fh = NFS_FH(dir),
name: name->name, .name = name->name,
len: name->len, .len = name->len,
sattr: sattr .sattr = sattr
}; };
struct nfs_diropok res = { struct nfs_diropok res = {
fh: fhandle, .fh = fhandle,
fattr: fattr .fattr = fattr
}; };
int status, mode; int status, mode;
...@@ -275,15 +275,15 @@ static int ...@@ -275,15 +275,15 @@ static int
nfs_proc_remove(struct inode *dir, struct qstr *name) nfs_proc_remove(struct inode *dir, struct qstr *name)
{ {
struct nfs_diropargs arg = { struct nfs_diropargs arg = {
fh: NFS_FH(dir), .fh = NFS_FH(dir),
name: name->name, .name = name->name,
len: name->len .len = name->len
}; };
struct rpc_message msg = { struct rpc_message msg = {
rpc_proc: NFSPROC_REMOVE, .rpc_proc = NFSPROC_REMOVE,
rpc_argp: &arg, .rpc_argp = &arg,
rpc_resp: NULL, .rpc_resp = NULL,
rpc_cred: NULL .rpc_cred = NULL
}; };
int status; int status;
...@@ -324,12 +324,12 @@ nfs_proc_rename(struct inode *old_dir, struct qstr *old_name, ...@@ -324,12 +324,12 @@ nfs_proc_rename(struct inode *old_dir, struct qstr *old_name,
struct inode *new_dir, struct qstr *new_name) struct inode *new_dir, struct qstr *new_name)
{ {
struct nfs_renameargs arg = { struct nfs_renameargs arg = {
fromfh: NFS_FH(old_dir), .fromfh = NFS_FH(old_dir),
fromname: old_name->name, .fromname = old_name->name,
fromlen: old_name->len, .fromlen = old_name->len,
tofh: NFS_FH(new_dir), .tofh = NFS_FH(new_dir),
toname: new_name->name, .toname = new_name->name,
tolen: new_name->len .tolen = new_name->len
}; };
int status; int status;
...@@ -343,10 +343,10 @@ static int ...@@ -343,10 +343,10 @@ static int
nfs_proc_link(struct inode *inode, struct inode *dir, struct qstr *name) nfs_proc_link(struct inode *inode, struct inode *dir, struct qstr *name)
{ {
struct nfs_linkargs arg = { struct nfs_linkargs arg = {
fromfh: NFS_FH(inode), .fromfh = NFS_FH(inode),
tofh: NFS_FH(dir), .tofh = NFS_FH(dir),
toname: name->name, .toname = name->name,
tolen: name->len .tolen = name->len
}; };
int status; int status;
...@@ -362,12 +362,12 @@ nfs_proc_symlink(struct inode *dir, struct qstr *name, struct qstr *path, ...@@ -362,12 +362,12 @@ nfs_proc_symlink(struct inode *dir, struct qstr *name, struct qstr *path,
struct nfs_fattr *fattr) struct nfs_fattr *fattr)
{ {
struct nfs_symlinkargs arg = { struct nfs_symlinkargs arg = {
fromfh: NFS_FH(dir), .fromfh = NFS_FH(dir),
fromname: name->name, .fromname = name->name,
fromlen: name->len, .fromlen = name->len,
topath: path->name, .topath = path->name,
tolen: path->len, .tolen = path->len,
sattr: sattr .sattr = sattr
}; };
int status; int status;
...@@ -383,14 +383,14 @@ nfs_proc_mkdir(struct inode *dir, struct qstr *name, struct iattr *sattr, ...@@ -383,14 +383,14 @@ nfs_proc_mkdir(struct inode *dir, struct qstr *name, struct iattr *sattr,
struct nfs_fh *fhandle, struct nfs_fattr *fattr) struct nfs_fh *fhandle, struct nfs_fattr *fattr)
{ {
struct nfs_createargs arg = { struct nfs_createargs arg = {
fh: NFS_FH(dir), .fh = NFS_FH(dir),
name: name->name, .name = name->name,
len: name->len, .len = name->len,
sattr: sattr .sattr = sattr
}; };
struct nfs_diropok res = { struct nfs_diropok res = {
fh: fhandle, .fh = fhandle,
fattr: fattr .fattr = fattr
}; };
int status; int status;
...@@ -405,9 +405,9 @@ static int ...@@ -405,9 +405,9 @@ static int
nfs_proc_rmdir(struct inode *dir, struct qstr *name) nfs_proc_rmdir(struct inode *dir, struct qstr *name)
{ {
struct nfs_diropargs arg = { struct nfs_diropargs arg = {
fh: NFS_FH(dir), .fh = NFS_FH(dir),
name: name->name, .name = name->name,
len: name->len .len = name->len
}; };
int status; int status;
...@@ -429,16 +429,16 @@ nfs_proc_readdir(struct inode *dir, struct rpc_cred *cred, ...@@ -429,16 +429,16 @@ nfs_proc_readdir(struct inode *dir, struct rpc_cred *cred,
u64 cookie, struct page *page, unsigned int count, int plus) u64 cookie, struct page *page, unsigned int count, int plus)
{ {
struct nfs_readdirargs arg = { struct nfs_readdirargs arg = {
fh: NFS_FH(dir), .fh = NFS_FH(dir),
cookie: cookie, .cookie = cookie,
count: count, .count = count,
pages: &page .pages = &page
}; };
struct rpc_message msg = { struct rpc_message msg = {
rpc_proc: NFSPROC_READDIR, .rpc_proc = NFSPROC_READDIR,
rpc_argp: &arg, .rpc_argp = &arg,
rpc_resp: NULL, .rpc_resp = NULL,
rpc_cred: cred .rpc_cred = cred
}; };
int status; int status;
...@@ -468,27 +468,27 @@ nfs_proc_statfs(struct nfs_server *server, struct nfs_fh *fhandle, ...@@ -468,27 +468,27 @@ nfs_proc_statfs(struct nfs_server *server, struct nfs_fh *fhandle,
extern u32 * nfs_decode_dirent(u32 *, struct nfs_entry *, int); extern u32 * nfs_decode_dirent(u32 *, struct nfs_entry *, int);
struct nfs_rpc_ops nfs_v2_clientops = { struct nfs_rpc_ops nfs_v2_clientops = {
version: 2, /* protocol version */ .version = 2, /* protocol version */
getroot: nfs_proc_get_root, .getroot = nfs_proc_get_root,
getattr: nfs_proc_getattr, .getattr = nfs_proc_getattr,
setattr: nfs_proc_setattr, .setattr = nfs_proc_setattr,
lookup: nfs_proc_lookup, .lookup = nfs_proc_lookup,
access: NULL, /* access */ .access = NULL, /* access */
readlink: nfs_proc_readlink, .readlink = nfs_proc_readlink,
read: nfs_proc_read, .read = nfs_proc_read,
write: nfs_proc_write, .write = nfs_proc_write,
commit: NULL, /* commit */ .commit = NULL, /* commit */
create: nfs_proc_create, .create = nfs_proc_create,
remove: nfs_proc_remove, .remove = nfs_proc_remove,
unlink_setup: nfs_proc_unlink_setup, .unlink_setup = nfs_proc_unlink_setup,
unlink_done: nfs_proc_unlink_done, .unlink_done = nfs_proc_unlink_done,
rename: nfs_proc_rename, .rename = nfs_proc_rename,
link: nfs_proc_link, .link = nfs_proc_link,
symlink: nfs_proc_symlink, .symlink = nfs_proc_symlink,
mkdir: nfs_proc_mkdir, .mkdir = nfs_proc_mkdir,
rmdir: nfs_proc_rmdir, .rmdir = nfs_proc_rmdir,
readdir: nfs_proc_readdir, .readdir = nfs_proc_readdir,
mknod: nfs_proc_mknod, .mknod = nfs_proc_mknod,
statfs: nfs_proc_statfs, .statfs = nfs_proc_statfs,
decode_dirent: nfs_decode_dirent, .decode_dirent = nfs_decode_dirent,
}; };
...@@ -103,8 +103,8 @@ static int nfs_follow_link(struct dentry *dentry, struct nameidata *nd) ...@@ -103,8 +103,8 @@ static int nfs_follow_link(struct dentry *dentry, struct nameidata *nd)
* symlinks can't do much... * symlinks can't do much...
*/ */
struct inode_operations nfs_symlink_inode_operations = { struct inode_operations nfs_symlink_inode_operations = {
readlink: nfs_readlink, .readlink = nfs_readlink,
follow_link: nfs_follow_link, .follow_link = nfs_follow_link,
getattr: nfs_getattr, .getattr = nfs_getattr,
setattr: nfs_setattr, .setattr = nfs_setattr,
}; };
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