All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesper Juhl <jj@chaosbits.net>
To: linux-nfs@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	Trond Myklebust <Trond.Myklebust@netapp.com>
Subject: [PATCH] NFS: Zap entire 'struct inode' in nfs_zap_caches_locked().
Date: Mon, 14 Feb 2011 22:56:33 +0100 (CET)	[thread overview]
Message-ID: <alpine.LNX.2.00.1102142252540.4530@swampdragon.chaosbits.net> (raw)

nfs_zap_caches_locked() attempts to zero all of the 'struct inode' that's 
passed in via the pointer variable 'inode'. Unfortunately it only manages 
to zero the size of a 'pointer to struct inode'. Fix that.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
 inode.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

 compile tested only

diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 1cc600e..6c4236e 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -145,7 +145,7 @@ static void nfs_zap_caches_locked(struct inode *inode)
 	nfsi->attrtimeo = NFS_MINATTRTIMEO(inode);
 	nfsi->attrtimeo_timestamp = jiffies;
 
-	memset(NFS_COOKIEVERF(inode), 0, sizeof(NFS_COOKIEVERF(inode)));
+	memset(NFS_COOKIEVERF(inode), 0, sizeof(*NFS_COOKIEVERF(inode)));
 	if (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode))
 		nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL|NFS_INO_REVAL_PAGECACHE;
 	else


-- 
Jesper Juhl <jj@chaosbits.net>            http://www.chaosbits.net/
Plain text mails only, please.
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html


             reply	other threads:[~2011-02-14 21:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-14 21:56 Jesper Juhl [this message]
2011-02-14 22:09 ` [PATCH] NFS: Zap entire 'struct inode' in nfs_zap_caches_locked() Trond Myklebust
2011-02-14 22:12   ` Jesper Juhl
2011-02-14 22:23     ` Trond Myklebust

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LNX.2.00.1102142252540.4530@swampdragon.chaosbits.net \
    --to=jj@chaosbits.net \
    --cc=Trond.Myklebust@netapp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.