|
@@ -62,7 +62,6 @@ struct nfs4_opendata;
|
|
static int _nfs4_proc_open(struct nfs4_opendata *data);
|
|
static int _nfs4_proc_open(struct nfs4_opendata *data);
|
|
static int nfs4_do_fsinfo(struct nfs_server *, struct nfs_fh *, struct nfs_fsinfo *);
|
|
static int nfs4_do_fsinfo(struct nfs_server *, struct nfs_fh *, struct nfs_fsinfo *);
|
|
static int nfs4_async_handle_error(struct rpc_task *, const struct nfs_server *);
|
|
static int nfs4_async_handle_error(struct rpc_task *, const struct nfs_server *);
|
|
-static int _nfs4_proc_access(struct inode *inode, struct nfs_access_entry *entry);
|
|
|
|
static int nfs4_handle_exception(const struct nfs_server *server, int errorcode, struct nfs4_exception *exception);
|
|
static int nfs4_handle_exception(const struct nfs_server *server, int errorcode, struct nfs4_exception *exception);
|
|
static int nfs4_wait_clnt_recover(struct rpc_clnt *clnt, struct nfs_client *clp);
|
|
static int nfs4_wait_clnt_recover(struct rpc_clnt *clnt, struct nfs_client *clp);
|
|
static int _nfs4_proc_lookup(struct inode *dir, const struct qstr *name, struct nfs_fh *fhandle, struct nfs_fattr *fattr);
|
|
static int _nfs4_proc_lookup(struct inode *dir, const struct qstr *name, struct nfs_fh *fhandle, struct nfs_fattr *fattr);
|
|
@@ -1726,10 +1725,16 @@ static int nfs4_proc_lookup(struct inode *dir, struct qstr *name, struct nfs_fh
|
|
|
|
|
|
static int _nfs4_proc_access(struct inode *inode, struct nfs_access_entry *entry)
|
|
static int _nfs4_proc_access(struct inode *inode, struct nfs_access_entry *entry)
|
|
{
|
|
{
|
|
|
|
+ struct nfs_server *server = NFS_SERVER(inode);
|
|
|
|
+ struct nfs_fattr fattr;
|
|
struct nfs4_accessargs args = {
|
|
struct nfs4_accessargs args = {
|
|
.fh = NFS_FH(inode),
|
|
.fh = NFS_FH(inode),
|
|
|
|
+ .bitmask = server->attr_bitmask,
|
|
|
|
+ };
|
|
|
|
+ struct nfs4_accessres res = {
|
|
|
|
+ .server = server,
|
|
|
|
+ .fattr = &fattr,
|
|
};
|
|
};
|
|
- struct nfs4_accessres res = { 0 };
|
|
|
|
struct rpc_message msg = {
|
|
struct rpc_message msg = {
|
|
.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_ACCESS],
|
|
.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_ACCESS],
|
|
.rpc_argp = &args,
|
|
.rpc_argp = &args,
|
|
@@ -1755,6 +1760,7 @@ static int _nfs4_proc_access(struct inode *inode, struct nfs_access_entry *entry
|
|
if (mode & MAY_EXEC)
|
|
if (mode & MAY_EXEC)
|
|
args.access |= NFS4_ACCESS_EXECUTE;
|
|
args.access |= NFS4_ACCESS_EXECUTE;
|
|
}
|
|
}
|
|
|
|
+ nfs_fattr_init(&fattr);
|
|
status = rpc_call_sync(NFS_CLIENT(inode), &msg, 0);
|
|
status = rpc_call_sync(NFS_CLIENT(inode), &msg, 0);
|
|
if (!status) {
|
|
if (!status) {
|
|
entry->mask = 0;
|
|
entry->mask = 0;
|
|
@@ -1764,6 +1770,7 @@ static int _nfs4_proc_access(struct inode *inode, struct nfs_access_entry *entry
|
|
entry->mask |= MAY_WRITE;
|
|
entry->mask |= MAY_WRITE;
|
|
if (res.access & (NFS4_ACCESS_LOOKUP|NFS4_ACCESS_EXECUTE))
|
|
if (res.access & (NFS4_ACCESS_LOOKUP|NFS4_ACCESS_EXECUTE))
|
|
entry->mask |= MAY_EXEC;
|
|
entry->mask |= MAY_EXEC;
|
|
|
|
+ nfs_refresh_inode(inode, &fattr);
|
|
}
|
|
}
|
|
return status;
|
|
return status;
|
|
}
|
|
}
|