and didn't really relate to any of the RFCs.
Replace with the more descriptive "nfs4_state_owner".
if (cred)
put_rpccred(cred);
/* Clean up the V4 state */
- nfs4_put_shareowner(inode, nfsi->wo_owner);
- nfs4_put_shareowner(inode, nfsi->ro_owner);
- nfs4_put_shareowner(inode, nfsi->rw_owner);
+ nfs4_put_state_owner(inode, nfsi->wo_owner);
+ nfs4_put_state_owner(inode, nfsi->ro_owner);
+ nfs4_put_state_owner(inode, nfsi->rw_owner);
}
void
int
nfs4_do_open(struct inode *dir, struct qstr *name, int flags,
struct iattr *sattr, struct nfs_fattr *fattr,
- struct nfs_fh *fhandle, struct nfs4_shareowner **spp)
+ struct nfs_fh *fhandle, struct nfs4_state_owner **spp)
{
- struct nfs4_shareowner *sp;
+ struct nfs4_state_owner *sp;
struct nfs_server *server = NFS_SERVER(dir);
struct nfs4_change_info d_cinfo;
int status;
};
status = -ENOMEM;
- if (!(sp = nfs4_get_shareowner(dir))) {
- dprintk("nfs4_do_open: nfs4_get_shareowner failed!\n");
+ if (!(sp = nfs4_get_state_owner(dir))) {
+ dprintk("nfs4_do_open: nfs4_get_state_owner failed!\n");
goto out;
}
if (o_arg.createmode & NFS4_CREATE_EXCLUSIVE){
int
nfs4_do_setattr(struct nfs_server *server, struct nfs_fattr *fattr,
struct nfs_fh *fhandle, struct iattr *sattr,
- struct nfs4_shareowner *sp)
+ struct nfs4_state_owner *sp)
{
struct nfs4_getattr getattr = {
.gt_bmval = nfs4_fattr_bitmap,
* stateid's in the inode.
*/
int
-nfs4_do_close(struct inode *inode, struct nfs4_shareowner *sp)
+nfs4_do_close(struct inode *inode, struct nfs4_state_owner *sp)
{
int status = 0;
struct nfs_closeargs arg = {
status = rpc_call_sync(NFS_SERVER(inode)->client, &msg, 0);
/* hmm. we are done with the inode, and in the process of freeing
- * the shareowner. we keep this around to process errors
+ * the state_owner. we keep this around to process errors
*/
nfs4_increment_seqid(status, sp);
up(&sp->so_sema);
{
struct inode * inode = dentry->d_inode;
int size_change = sattr->ia_valid & ATTR_SIZE;
- struct nfs4_shareowner *sp = NULL;
+ struct nfs4_state_owner *sp = NULL;
int status;
fattr->valid = 0;
struct page *page, int *eofp)
{
struct nfs_server *server = NFS_SERVER(inode);
- struct nfs4_shareowner *sp;
+ struct nfs4_state_owner *sp;
uint64_t offset = page_offset(page) + base;
struct nfs_readargs arg = {
.fh = NFS_FH(inode),
struct page *page, struct nfs_writeverf *verf)
{
struct nfs_server *server = NFS_SERVER(inode);
- struct nfs4_shareowner *sp;
+ struct nfs4_state_owner *sp;
uint64_t offset = page_offset(page) + base;
struct nfs_writeargs arg = {
.fh = NFS_FH(inode),
int flags, struct nfs_fh *fhandle, struct nfs_fattr *fattr)
{
int oflags;
- struct nfs4_shareowner *sp = NULL;
+ struct nfs4_state_owner *sp = NULL;
int status;
oflags = O_RDONLY | O_CREAT | (flags & O_EXCL);
};
struct inode *inode = data->inode;
struct nfs_page *req = nfs_list_entry(data->pages.next);
- struct nfs4_shareowner *sp;
+ struct nfs4_state_owner *sp;
int flags;
data->args.fh = NFS_FH(inode);
};
struct inode *inode = data->inode;
struct nfs_page *req = nfs_list_entry(data->pages.next);
- struct nfs4_shareowner *sp;
+ struct nfs4_state_owner *sp;
int stable;
int flags;
* This ugliness will go away with lookup-intent...
*/
while (!nfs4_get_inode_share(inode, flags)) {
- struct nfs4_shareowner *sp = NULL;
+ struct nfs4_state_owner *sp = NULL;
status = nfs4_do_open(dir, &dentry->d_name, flags, NULL, NULL, NULL, &sp);
if (status) {
- nfs4_put_shareowner(inode,sp);
+ nfs4_put_state_owner(inode,sp);
break;
}
if (nfs4_set_inode_share(inode, sp, flags))
- nfs4_put_shareowner(inode,sp);
+ nfs4_put_state_owner(inode,sp);
}
out:
unlock_kernel();
}
/*
- * nfs4_get_shareowner(): this is called on the OPEN or CREATE path to
- * obtain a new shareowner.
+ * nfs4_get_state_owner(): this is called on the OPEN or CREATE path to
+ * obtain a new state_owner.
*
- * There are three shareowners (open_owner4 in rfc3010) per inode,
+ * There are three state_owners (open_owner4 in rfc3010) per inode,
* one for each possible combination of share lock access. Since
* Linux does not support the deny access type, there are
* three (not 9) referenced by the nfs_inode:
* O_RDONLY: inode->ro_owner
* O_RDWR: inode->rw_owner
*
- * We create a new shareowner the first time a file is OPENed with
+ * We create a new state_owner the first time a file is OPENed with
* one of the above shares. All other OPENs with a similar
* share use the single stateid associated with the inode.
*
*/
-struct nfs4_shareowner *
-nfs4_get_shareowner(struct inode *dir)
+struct nfs4_state_owner *
+nfs4_get_state_owner(struct inode *dir)
{
struct nfs4_client *clp;
- struct nfs4_shareowner *sp;
+ struct nfs4_state_owner *sp;
sp = kmalloc(sizeof(*sp),GFP_KERNEL);
if (!sp)
}
/*
- * Called for each non-null inode shareowner in nfs_clear_inode,
+ * Called for each non-null inode state_owner in nfs_clear_inode,
* or if nfs4_do_open fails.
*/
void
-nfs4_put_shareowner(struct inode *inode, struct nfs4_shareowner *sp)
+nfs4_put_state_owner(struct inode *inode, struct nfs4_state_owner *sp)
{
if (!sp)
return;
* see comments nfs_fs.h:seqid_mutating_error()
*/
void
-nfs4_increment_seqid(u32 status, struct nfs4_shareowner *sp)
+nfs4_increment_seqid(u32 status, struct nfs4_state_owner *sp)
{
if (status == NFS_OK || seqid_mutating_err(status))
sp->so_seqid++;
* Called by nfs4_proc_open to set the appropriate stateid
*/
int
-nfs4_set_inode_share(struct inode * inode, struct nfs4_shareowner *sp, unsigned int open_flags)
+nfs4_set_inode_share(struct inode * inode, struct nfs4_state_owner *sp, unsigned int open_flags)
{
struct nfs_inode *nfsi = NFS_I(inode);
* Called by nfs4_proc_open.
*/
int
-nfs4_test_shareowner(struct inode *inode, unsigned int open_flags)
+nfs4_test_state_owner(struct inode *inode, unsigned int open_flags)
{
struct nfs_inode *nfsi = NFS_I(inode);
return 1;
}
-struct nfs4_shareowner *
+struct nfs4_state_owner *
nfs4_get_inode_share(struct inode * inode, unsigned int open_flags)
{
struct nfs_inode *nfsi = NFS_I(inode);
#ifdef CONFIG_NFS_V4
/* NFSv4 state */
- struct nfs4_shareowner *ro_owner;
- struct nfs4_shareowner *wo_owner;
- struct nfs4_shareowner *rw_owner;
+ struct nfs4_state_owner *ro_owner;
+ struct nfs4_state_owner *wo_owner;
+ struct nfs4_state_owner *rw_owner;
#endif /* CONFIG_NFS_V4*/
struct inode vfs_inode;
};
/*
-* The ->so_sema is held during all shareowner seqid-mutating operations:
+* The ->so_sema is held during all state_owner seqid-mutating operations:
* OPEN, OPEN_DOWNGRADE, and CLOSE.
* Its purpose is to properly serialize so_seqid, as mandated by
* the protocol.
*/
-struct nfs4_shareowner {
+struct nfs4_state_owner {
u32 so_id; /* 32-bit identifier, unique */
struct semaphore so_sema;
u32 so_seqid; /* protected by so_sema */
/* nfs4proc.c */
extern int nfs4_proc_renew(struct nfs_server *server);
-extern int nfs4_do_close(struct inode *inode, struct nfs4_shareowner *sp);
+extern int nfs4_do_close(struct inode *inode, struct nfs4_state_owner *sp);
/* nfs4renewd.c */
extern int nfs4_init_renewd(struct nfs_server *server);
/* nfs4state.c */
extern struct nfs4_client *nfs4_get_client(void);
extern void nfs4_put_client(struct nfs4_client *clp);
-extern struct nfs4_shareowner * nfs4_get_shareowner(struct inode *inode);
-void nfs4_put_shareowner(struct inode *inode, struct nfs4_shareowner *sp);
+extern struct nfs4_state_owner * nfs4_get_state_owner(struct inode *inode);
+void nfs4_put_state_owner(struct inode *inode, struct nfs4_state_owner *sp);
extern int nfs4_set_inode_share(struct inode * inode,
- struct nfs4_shareowner *sp, unsigned int flags);
-extern void nfs4_increment_seqid(u32 status, struct nfs4_shareowner *sp);
-extern int nfs4_test_shareowner(struct inode *inode, unsigned int open_flags);
-struct nfs4_shareowner * nfs4_get_inode_share(struct inode * inode, unsigned int open_flags);
+ struct nfs4_state_owner *sp, unsigned int flags);
+extern void nfs4_increment_seqid(u32 status, struct nfs4_state_owner *sp);
+extern int nfs4_test_state_owner(struct inode *inode, unsigned int open_flags);
+struct nfs4_state_owner * nfs4_get_inode_share(struct inode * inode, unsigned int open_flags);
#else
#define create_nfsv4_state(server, data) 0
#define destroy_nfsv4_state(server) do { } while (0)
-#define nfs4_put_shareowner(inode, owner) do { } while (0)
+#define nfs4_put_state_owner(inode, owner) do { } while (0)
#endif
#endif /* __KERNEL__ */