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