From: andros@netapp.com
To: bhalevy@panasas.com
Cc: linux-nfs@vger.kernel.org, Andy Adamson <andros@netapp.com>
Subject: [PATCH 1/5] SQUASHME pnfs-submit: remove pnfs_init_once
Date: Tue, 6 Jul 2010 17:16:58 -0400 [thread overview]
Message-ID: <1278451022-2889-2-git-send-email-andros@netapp.com> (raw)
In-Reply-To: <1278451022-2889-1-git-send-email-andros@netapp.com>
From: Andy Adamson <andros@netapp.com>
Place all layout initialization in nfs4_init_once
Signed-off-by: Andy Adamson <andros@netapp.com>
---
fs/nfs/inode.c | 17 ++++++-----------
1 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 7989dea..231cfa3 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -1416,8 +1416,13 @@ void nfs_destroy_inode(struct inode *inode)
kmem_cache_free(nfs_inode_cachep, nfsi);
}
-static void pnfs_init_once(struct nfs_inode *nfsi)
+static inline void nfs4_init_once(struct nfs_inode *nfsi)
{
+#ifdef CONFIG_NFS_V4
+ INIT_LIST_HEAD(&nfsi->open_states);
+ nfsi->delegation = NULL;
+ nfsi->delegation_state = 0;
+ init_rwsem(&nfsi->rwsem);
#ifdef CONFIG_NFS_V4_1
init_waitqueue_head(&nfsi->lo_waitq);
seqlock_init(&nfsi->layout.seqlock);
@@ -1426,15 +1431,6 @@ static void pnfs_init_once(struct nfs_inode *nfsi)
nfsi->layout.refcount = 0;
nfsi->layout.ld_data = NULL;
#endif /* CONFIG_NFS_V4_1 */
-}
-
-static inline void nfs4_init_once(struct nfs_inode *nfsi)
-{
-#ifdef CONFIG_NFS_V4
- INIT_LIST_HEAD(&nfsi->open_states);
- nfsi->delegation = NULL;
- nfsi->delegation_state = 0;
- init_rwsem(&nfsi->rwsem);
#endif
}
@@ -1453,7 +1449,6 @@ static void init_once(void *foo)
INIT_HLIST_HEAD(&nfsi->silly_list);
init_waitqueue_head(&nfsi->waitqueue);
nfs4_init_once(nfsi);
- pnfs_init_once(nfsi);
}
static int __init nfs_init_inodecache(void)
--
1.6.6
next prev parent reply other threads:[~2010-07-06 20:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-06 21:16 [PATCH 0/5] cleanup inode.c and bug fixes andros
2010-07-06 21:16 ` andros [this message]
2010-07-06 21:16 ` [PATCH 2/5] SQUASHME pnfs-submit remove pnfs_alloc_init_inode andros
2010-07-06 21:17 ` [PATCH 3/5] SQUASHME pnfs-submit: remove pnfs_destroy_inode andros
2010-07-06 21:17 ` [PATCH 4/5] SQUASHME pnfs-submit: set layoutcommit status after async error handler andros
2010-07-06 21:17 ` [PATCH 5/5] SQUASHME pnfs-submit: set layoutget " andros
2010-07-07 9:27 ` [PATCH 2/5] SQUASHME pnfs-submit remove pnfs_alloc_init_inode Boaz Harrosh
2010-07-07 17:03 ` William A. (Andy) Adamson
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=1278451022-2889-2-git-send-email-andros@netapp.com \
--to=andros@netapp.com \
--cc=bhalevy@panasas.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox