From patchwork Fri Oct 15 19:34:04 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 257451 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o9FJXvSv007824 for ; Fri, 15 Oct 2010 19:34:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932339Ab0JOTeO (ORCPT ); Fri, 15 Oct 2010 15:34:14 -0400 Received: from cdptpa-omtalb.mail.rr.com ([75.180.132.121]:41087 "EHLO cdptpa-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756738Ab0JOTeM (ORCPT ); Fri, 15 Oct 2010 15:34:12 -0400 X-Authority-Analysis: v=1.1 cv=lu/RhtYP0ChAeUxMEPBris12a71TWT5f9yvo3GNwP9w= c=1 sm=0 a=IOe0MyQBv1YA:10 a=ld/erqUjW76FpBUqCqkKeA==:17 a=20KFwNOVAAAA:8 a=vSHtV_GM5lGVhC1g0joA:9 a=OTFZSK_ehqxIuQcEv2gA:7 a=5Ndw5UjUvNY60Ei9P4m4QKTiutoA:4 a=jEp0ucaQiEUA:10 a=0kPLrQdw3YYA:10 a=ld/erqUjW76FpBUqCqkKeA==:117 X-Cloudmark-Score: 0 X-Originating-IP: 71.70.153.3 Received: from [71.70.153.3] ([71.70.153.3:60934] helo=mail.poochiereds.net) by cdptpa-oedge02.mail.rr.com (envelope-from ) (ecelerity 2.2.3.46 r()) with ESMTP id 77/52-14228-2BCA8BC4; Fri, 15 Oct 2010 19:34:10 +0000 Received: by mail.poochiereds.net (Postfix, from userid 4447) id 97A5658191; Fri, 15 Oct 2010 15:34:09 -0400 (EDT) From: Jeff Layton To: smfrench@gmail.com Cc: linux-cifs@vger.kernel.org Subject: [PATCH 09/13] cifs: move cifsFileInfo_put to file.c Date: Fri, 15 Oct 2010 15:34:04 -0400 Message-Id: <1287171248-464-10-git-send-email-jlayton@redhat.com> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1287171248-464-1-git-send-email-jlayton@redhat.com> References: <1287171248-464-1-git-send-email-jlayton@redhat.com> Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 15 Oct 2010 19:34:15 +0000 (UTC) diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index 087bc4b..d5beb42 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h @@ -408,15 +408,7 @@ static inline void cifsFileInfo_get(struct cifsFileInfo *cifs_file) atomic_inc(&cifs_file->count); } -/* Release a reference on the file private data */ -static inline void cifsFileInfo_put(struct cifsFileInfo *cifs_file) -{ - if (atomic_dec_and_test(&cifs_file->count)) { - cifs_put_tlink(cifs_file->tlink); - dput(cifs_file->dentry); - kfree(cifs_file); - } -} +void cifsFileInfo_put(struct cifsFileInfo *cifs_file); /* * One of these for each file inode diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 26048dc..a3634e4 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -266,6 +266,16 @@ cifs_new_fileinfo(__u16 fileHandle, struct file *file, return pCifsFile; } +/* Release a reference on the file private data */ +void cifsFileInfo_put(struct cifsFileInfo *cifs_file) +{ + if (atomic_dec_and_test(&cifs_file->count)) { + cifs_put_tlink(cifs_file->tlink); + dput(cifs_file->dentry); + kfree(cifs_file); + } +} + int cifs_open(struct inode *inode, struct file *file) { int rc = -EACCES;