diff options
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 3b1080118452..df3d3068242e 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -52,6 +52,7 @@ | |||
52 | #include <linux/namei.h> | 52 | #include <linux/namei.h> |
53 | #include <linux/mount.h> | 53 | #include <linux/mount.h> |
54 | #include <linux/module.h> | 54 | #include <linux/module.h> |
55 | #include <linux/nfs_idmap.h> | ||
55 | #include <linux/sunrpc/bc_xprt.h> | 56 | #include <linux/sunrpc/bc_xprt.h> |
56 | #include <linux/xattr.h> | 57 | #include <linux/xattr.h> |
57 | #include <linux/utsname.h> | 58 | #include <linux/utsname.h> |
@@ -760,6 +761,8 @@ struct nfs4_opendata { | |||
760 | struct nfs_openres o_res; | 761 | struct nfs_openres o_res; |
761 | struct nfs_open_confirmargs c_arg; | 762 | struct nfs_open_confirmargs c_arg; |
762 | struct nfs_open_confirmres c_res; | 763 | struct nfs_open_confirmres c_res; |
764 | struct nfs4_string owner_name; | ||
765 | struct nfs4_string group_name; | ||
763 | struct nfs_fattr f_attr; | 766 | struct nfs_fattr f_attr; |
764 | struct nfs_fattr dir_attr; | 767 | struct nfs_fattr dir_attr; |
765 | struct dentry *dir; | 768 | struct dentry *dir; |
@@ -783,6 +786,7 @@ static void nfs4_init_opendata_res(struct nfs4_opendata *p) | |||
783 | p->o_res.server = p->o_arg.server; | 786 | p->o_res.server = p->o_arg.server; |
784 | nfs_fattr_init(&p->f_attr); | 787 | nfs_fattr_init(&p->f_attr); |
785 | nfs_fattr_init(&p->dir_attr); | 788 | nfs_fattr_init(&p->dir_attr); |
789 | nfs_fattr_init_names(&p->f_attr, &p->owner_name, &p->group_name); | ||
786 | } | 790 | } |
787 | 791 | ||
788 | static struct nfs4_opendata *nfs4_opendata_alloc(struct dentry *dentry, | 792 | static struct nfs4_opendata *nfs4_opendata_alloc(struct dentry *dentry, |
@@ -814,6 +818,7 @@ static struct nfs4_opendata *nfs4_opendata_alloc(struct dentry *dentry, | |||
814 | p->o_arg.name = &dentry->d_name; | 818 | p->o_arg.name = &dentry->d_name; |
815 | p->o_arg.server = server; | 819 | p->o_arg.server = server; |
816 | p->o_arg.bitmask = server->attr_bitmask; | 820 | p->o_arg.bitmask = server->attr_bitmask; |
821 | p->o_arg.dir_bitmask = server->cache_consistency_bitmask; | ||
817 | p->o_arg.claim = NFS4_OPEN_CLAIM_NULL; | 822 | p->o_arg.claim = NFS4_OPEN_CLAIM_NULL; |
818 | if (flags & O_CREAT) { | 823 | if (flags & O_CREAT) { |
819 | u32 *s; | 824 | u32 *s; |
@@ -850,6 +855,7 @@ static void nfs4_opendata_free(struct kref *kref) | |||
850 | dput(p->dir); | 855 | dput(p->dir); |
851 | dput(p->dentry); | 856 | dput(p->dentry); |
852 | nfs_sb_deactive(sb); | 857 | nfs_sb_deactive(sb); |
858 | nfs_fattr_free_names(&p->f_attr); | ||
853 | kfree(p); | 859 | kfree(p); |
854 | } | 860 | } |
855 | 861 | ||
@@ -1574,6 +1580,8 @@ static int _nfs4_recover_proc_open(struct nfs4_opendata *data) | |||
1574 | if (status != 0 || !data->rpc_done) | 1580 | if (status != 0 || !data->rpc_done) |
1575 | return status; | 1581 | return status; |
1576 | 1582 | ||
1583 | nfs_fattr_map_and_free_names(NFS_SERVER(dir), &data->f_attr); | ||
1584 | |||
1577 | nfs_refresh_inode(dir, o_res->dir_attr); | 1585 | nfs_refresh_inode(dir, o_res->dir_attr); |
1578 | 1586 | ||
1579 | if (o_res->rflags & NFS4_OPEN_RESULT_CONFIRM) { | 1587 | if (o_res->rflags & NFS4_OPEN_RESULT_CONFIRM) { |
@@ -1606,6 +1614,8 @@ static int _nfs4_proc_open(struct nfs4_opendata *data) | |||
1606 | return status; | 1614 | return status; |
1607 | } | 1615 | } |
1608 | 1616 | ||
1617 | nfs_fattr_map_and_free_names(server, &data->f_attr); | ||
1618 | |||
1609 | if (o_arg->open_flags & O_CREAT) { | 1619 | if (o_arg->open_flags & O_CREAT) { |
1610 | update_changeattr(dir, &o_res->cinfo); | 1620 | update_changeattr(dir, &o_res->cinfo); |
1611 | nfs_post_op_update_inode(dir, o_res->dir_attr); | 1621 | nfs_post_op_update_inode(dir, o_res->dir_attr); |