]> git.baikalelectronics.ru Git - kernel.git/commitdiff
afs: Don't save callback version and type fields
authorDavid Howells <dhowells@redhat.com>
Tue, 14 May 2019 14:35:44 +0000 (15:35 +0100)
committerDavid Howells <dhowells@redhat.com>
Thu, 16 May 2019 21:23:21 +0000 (22:23 +0100)
Don't save callback version and type fields as the version is about the
format of the callback information and the type is relative to the
particular RPC call.

Signed-off-by: David Howells <dhowells@redhat.com>
fs/afs/afs.h
fs/afs/fsclient.c
fs/afs/inode.c
fs/afs/internal.h
fs/afs/super.c
fs/afs/yfsclient.c

index 8fa0dffff1cc3cb51be0d40c7b05d67243382dce..819678bd8becc9601c38881c67b54b3c4acc9bb1 100644 (file)
@@ -72,8 +72,8 @@ typedef enum {
 
 struct afs_callback {
        time64_t                expires_at;     /* Time at which expires */
-       unsigned                version;        /* Callback version */
-       afs_callback_type_t     type;           /* Type of callback */
+       //unsigned              version;        /* Callback version */
+       //afs_callback_type_t   type;           /* Type of callback */
 };
 
 struct afs_callback_break {
index 5c1b7a0315097e9fd1976a62ddb199bec2223b47..89b684c957b9917e6c84f4c1d9f3833e541d9561 100644 (file)
@@ -148,9 +148,9 @@ static void xdr_decode_AFSCallBack(const __be32 **_bp,
        struct afs_callback *cb = &scb->callback;
        const __be32 *bp = *_bp;
 
-       cb->version     = ntohl(*bp++);
+       bp++; /* version */
        cb->expires_at  = xdr_decode_expiry(call, ntohl(*bp++));
-       cb->type        = ntohl(*bp++);
+       bp++; /* type */
        scb->have_cb    = true;
        *_bp = bp;
 }
index 4a9004b9ac5fb970125c728843275caf4c743807..8d3d060a33fcf766914e5e68af3c95a1a2af1d4b 100644 (file)
@@ -136,12 +136,8 @@ static int afs_inode_init_from_status(struct afs_vnode *vnode, struct key *key,
        if (!scb->have_cb) {
                /* it's a symlink we just created (the fileserver
                 * didn't give us a callback) */
-               vnode->cb_version = 0;
-               vnode->cb_type = 0;
                vnode->cb_expires_at = ktime_get_real_seconds();
        } else {
-               vnode->cb_version = scb->callback.version;
-               vnode->cb_type = scb->callback.type;
                vnode->cb_expires_at = scb->callback.expires_at;
                old_cbi = vnode->cb_interest;
                if (cbi != old_cbi)
@@ -248,8 +244,6 @@ static void afs_apply_callback(struct afs_fs_cursor *fc,
        struct afs_callback *cb = &scb->callback;
 
        if (!afs_cb_is_broken(cb_break, vnode, fc->cbi)) {
-               vnode->cb_version       = cb->version;
-               vnode->cb_type          = cb->type;
                vnode->cb_expires_at    = cb->expires_at;
                old = vnode->cb_interest;
                if (old != fc->cbi) {
@@ -535,7 +529,7 @@ struct inode *afs_iget(struct super_block *sb, struct key *key,
        clear_bit(AFS_VNODE_UNSET, &vnode->flags);
        inode->i_flags |= S_NOATIME;
        unlock_new_inode(inode);
-       _leave(" = %p [CB { v=%u t=%u }]", inode, vnode->cb_version, vnode->cb_type);
+       _leave(" = %p", inode);
        return inode;
 
        /* failure */
index 6ed7d4df4ec61b2f9e1fe4c155bf4776874000a4..ca7edfe97410e183422c51b8ff53c001b3d73b48 100644 (file)
@@ -683,8 +683,6 @@ struct afs_vnode {
        seqlock_t               cb_lock;        /* Lock for ->cb_interest, ->status, ->cb_*break */
 
        time64_t                cb_expires_at;  /* time at which callback expires */
-       unsigned                cb_version;     /* callback version */
-       afs_callback_type_t     cb_type;        /* type of callback */
 };
 
 static inline struct fscache_cookie *afs_vnode_cache(struct afs_vnode *vnode)
index f45a95eea23702f46f084ef9a1da1736ecf10a2d..a81c235f8c57e006e68936fcb7efb2eaa85f0701 100644 (file)
@@ -683,7 +683,6 @@ static struct inode *afs_alloc_inode(struct super_block *sb)
 #endif
 
        vnode->flags            = 1 << AFS_VNODE_UNSET;
-       vnode->cb_type          = 0;
        vnode->lock_state       = AFS_VNODE_LOCK_NONE;
 
        init_rwsem(&vnode->rmdir_lock);
index 80f579594660aec8646e4da4b0ca221506613da5..c8f71fc9920b1be4fa55c9d4bc25788c22f7bf8d 100644 (file)
@@ -245,8 +245,6 @@ static void xdr_decode_YFSCallBack(const __be32 **_bp,
        cb_expiry = call->reply_time;
        cb_expiry = ktime_add(cb_expiry, xdr_to_u64(x->expiration_time) * 100);
        cb->expires_at  = ktime_divns(cb_expiry, NSEC_PER_SEC);
-       cb->version     = ntohl(x->version);
-       cb->type        = ntohl(x->type);
        scb->have_cb    = true;
        *_bp += xdr_size(x);
 }