[prev in list] [next in list] [prev in thread] [next in thread]
List: intermezzo-devel
Subject: Re: [willy@debian.org: [PATCH] Intermezzo should call vfs_permission]
From: "Yang, Chen" <chyang () clusterfs ! com>
Date: 2004-02-03 16:39:01
Message-ID: 00db01c3ea75$02d01390$4cda96d3 () ccr ! corp ! intel ! com
[Download RAW message or body]
Hi, Matthew:
I will merge it with the patch posted here to Linus in this week.
Thanks for your reminder.
--
Yang, Chen
----- Original Message -----
From: "Matthew Wilcox" <willy@debian.org>
To: <intermezzo-devel@lists.sourceforge.net>
Sent: Monday, February 02, 2004 10:23 AM
Subject: [willy@debian.org: [PATCH] Intermezzo should call vfs_permission]
>
> This patch has not yet found its way into Linus' tree. Can someone
> take care of it?
>
> ----- Forwarded message from Matthew Wilcox <willy@debian.org> -----
>
> Date: Fri, 31 Oct 2003 13:20:24 +0000
> From: Matthew Wilcox <willy@debian.org>
> To: intermezzo-devel@lists.sf.net
> Cc: linux-fsdevel@vger.kernel.org
> Subject: [PATCH] Intermezzo should call vfs_permission
> User-Agent: Mutt/1.4.1i
> Precedence: bulk
> X-Mailing-List: linux-fsdevel@vger.kernel.org
>
>
> This patch fixes some extremely naughty behaviour by intermezzo where it
> overrides a member of an inode's i_op -- which is probably shared between
> all inodes of that filesystem type! It turns out that the intended
> behaviour is accomplished equally well by just calling vfs_permission().
>
> Index: fs/intermezzo/dir.c
> ===================================================================
> RCS file: /var/cvs/linux-2.6/fs/intermezzo/dir.c,v
> retrieving revision 1.12
> diff -u -p -r1.12 dir.c
> --- a/fs/intermezzo/dir.c 8 Oct 2003 20:52:46 -0000 1.12
> +++ b/fs/intermezzo/dir.c 31 Oct 2003 03:10:01 -0000
> @@ -835,10 +835,9 @@ int presto_permission(struct inode *inod
> {
> unsigned short mode = inode->i_mode;
> struct presto_cache *cache;
> - int rc;
>
> ENTRY;
> - if ( presto_can_ilookup() && !(mask & S_IWOTH)) {
> + if (presto_can_ilookup() && !(mask & S_IWOTH)) {
> CDEBUG(D_CACHE, "ilookup on %ld OK\n", inode->i_ino);
> EXIT;
> return 0;
> @@ -861,18 +860,8 @@ int presto_permission(struct inode *inod
> }
> }
>
> - /* The cache filesystem doesn't have its own permission function,
> - * but we don't want to duplicate the VFS code here. In order
> - * to avoid looping from permission calling this function again,
> - * we temporarily override the permission operation while we call
> - * the VFS permission function.
> - */
> - inode->i_op->permission = NULL;
> - rc = permission(inode, mask, nd);
> - inode->i_op->permission = &presto_permission;
> -
> EXIT;
> - return rc;
> + return vfs_permission(inode, mask);
> }
>
>
>
> --
> "It's not Hollywood. War is real, war is primarily not about defeat or
> victory, it is about death. I've seen thousands and thousands of dead
bodies.
> Do you think I want to have an academic debate on this subject?" -- Robert
Fisk
> -
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel"
in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
> ----- End forwarded message -----
>
> --
> "Next the statesmen will invent cheap lies, putting the blame upon
> the nation that is attacked, and every man will be glad of those
> conscience-soothing falsities, and will diligently study them, and refuse
> to examine any refutations of them; and thus he will by and by convince
> himself that the war is just, and will thank God for the better sleep
> he enjoys after this process of grotesque self-deception." -- Mark Twain
>
>
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> intermezzo-devel mailing list
> intermezzo-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/intermezzo-devel
>
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
intermezzo-devel mailing list
intermezzo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/intermezzo-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic