]> git.hungrycats.org Git - linux/commitdiff
Rename the struct "nfs4_shareowner". The name was confusing
authorTrond Myklebust <trond.myklebust@fys.uio.no>
Tue, 7 Oct 2003 11:46:31 +0000 (07:46 -0400)
committerTrond Myklebust <trond.myklebust@fys.uio.no>
Tue, 7 Oct 2003 11:46:31 +0000 (07:46 -0400)
and didn't really relate to any of the RFCs.

Replace with the more descriptive "nfs4_state_owner".

fs/nfs/inode.c
fs/nfs/nfs4proc.c
fs/nfs/nfs4state.c
include/linux/nfs_fs.h

index 2607af8c6f1ebec2de98b90612c58ec2646fa714..ec54a826cd177b800c03ccbddb656e44a6969c95 100644 (file)
@@ -152,9 +152,9 @@ nfs_clear_inode(struct inode *inode)
        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
index c778e648b7f3c61c845b93bc5bae3133d270f9d1..31bb4b9650d4ad0bedca3a706b3f4534ffbe4bd7 100644 (file)
@@ -556,9 +556,9 @@ process_cinfo(struct nfs4_change_info *info, struct nfs_fattr *fattr)
 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;
@@ -600,8 +600,8 @@ nfs4_do_open(struct inode *dir, struct qstr *name, int flags,
        };
 
        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){
@@ -664,7 +664,7 @@ out:
 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,
@@ -706,7 +706,7 @@ nfs4_do_setattr(struct nfs_server *server, struct nfs_fattr *fattr,
  * 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 = {
@@ -728,7 +728,7 @@ nfs4_do_close(struct inode *inode, struct nfs4_shareowner *sp)
        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);
@@ -855,7 +855,7 @@ nfs4_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr,
 {
        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;
@@ -1000,7 +1000,7 @@ nfs4_proc_read(struct inode *inode, struct rpc_cred *cred,
               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),
@@ -1054,7 +1054,7 @@ nfs4_proc_write(struct inode *inode, struct rpc_cred *cred,
                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),
@@ -1115,7 +1115,7 @@ nfs4_proc_create(struct inode *dir, struct qstr *name, struct iattr *sattr,
                  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);
@@ -1444,7 +1444,7 @@ nfs4_proc_read_setup(struct nfs_read_data *data, unsigned int count)
        };
        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);
@@ -1522,7 +1522,7 @@ nfs4_proc_write_setup(struct nfs_write_data *data, unsigned int count, int how)
        };
        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;
        
@@ -1699,14 +1699,14 @@ nfs4_proc_file_open(struct inode *inode, struct file *filp)
 * 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();
index e8a1c2070876c06430d94b4e23be5b314523ed2d..6249f8f010ee48a5716c04e043c1c5ac26c5899d 100644 (file)
@@ -88,10 +88,10 @@ nfs4_alloc_lockowner_id(struct nfs4_client *clp)
 }
 
 /*
- * 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:
@@ -100,16 +100,16 @@ nfs4_alloc_lockowner_id(struct nfs4_client *clp)
  * 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)
@@ -124,11 +124,11 @@ nfs4_get_shareowner(struct inode *dir)
 }
 
 /*
- * 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;
@@ -145,7 +145,7 @@ nfs4_put_shareowner(struct inode *inode, struct nfs4_shareowner *sp)
 * 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++;
@@ -155,7 +155,7 @@ nfs4_increment_seqid(u32 status, struct nfs4_shareowner *sp)
 * 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);
 
@@ -187,7 +187,7 @@ nfs4_set_inode_share(struct inode * inode, struct nfs4_shareowner *sp, unsigned
 * 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);
 
@@ -207,7 +207,7 @@ nfs4_test_shareowner(struct inode *inode, unsigned int open_flags)
         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);
index 7a87a46878a3dba74f8d942dd7dbc0bc48acfc05..e7aa4552b0a6be18a6791abadc62ff838bfe43f7 100644 (file)
@@ -157,9 +157,9 @@ struct nfs_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;
@@ -477,12 +477,12 @@ struct nfs4_client {
 };
 
 /*
-* 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 */
@@ -493,7 +493,7 @@ struct nfs4_shareowner {
 
 /* 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);
@@ -501,13 +501,13 @@ 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);
 
 
 
@@ -537,7 +537,7 @@ destroy_nfsv4_state(struct nfs_server *server)
 #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__ */