lkml.org 
[lkml]   [2001]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH/CFT] Fix NFS mmap problems w.r.t. page_launder() in 2.4.6...
At 11:48 14/07/2001, Trond Myklebust wrote:
[snip]
>+/*
>+ * For the moment, the only task for the NFS clear_inode method is to
>+ * release the mmap credential
>+ */
>+static void
>+nfs_clear_inode(struct inode *inode)
>+{
>+ struct rpc_cred *cred = NFS_I(inode)->mm_cred;
>+
>+ if (cred) {
>+ put_rpccred(cred);
>+ NFS_I(inode)->mm_cred = 0;
>+ }
>+}

I know it's nit-picking but wouldn't it be cleaner/faster to do:

+static void
+nfs_clear_inode(struct inode *inode)
+{
+ struct rpc_cred **cred = &NFS_I(inode)->mm_cred;
+
+ if (*cred) {
+ put_rpccred(*cred);
+ *cred = 0;
+ }
+}

Just a thought before waking up properly... Haven't looked at the generated
assembly or anything.

Best regards,

Anton


--
"Nothing succeeds like success." - Alexandre Dumas
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Linux NTFS Maintainer / WWW: http://linux-ntfs.sf.net/
ICQ: 8561279 / WWW: http://www-stu.christs.cam.ac.uk/~aia21/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:57    [W:0.037 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site