Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751046AbVIWOvA (ORCPT ); Fri, 23 Sep 2005 10:51:00 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751049AbVIWOvA (ORCPT ); Fri, 23 Sep 2005 10:51:00 -0400 Received: from 223-177.adsl.pool.ew.hu ([193.226.223.177]:51212 "EHLO dorka.pomaz.szeredi.hu") by vger.kernel.org with ESMTP id S1751042AbVIWOu7 (ORCPT ); Fri, 23 Sep 2005 10:50:59 -0400 To: akpm@osdl.org CC: linux-kernel@vger.kernel.org Subject: [PATCH] open: cleanup in lookup_flags() Message-Id: From: Miklos Szeredi Date: Fri, 23 Sep 2005 16:50:43 +0200 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 858 Lines: 24 lookup_flags() is only called from the non-create case, so it needn't check for O_CREAT|O_EXCL. Signed-off-by: Miklos Szeredi Index: linux/fs/namei.c =================================================================== --- linux.orig/fs/namei.c 2005-09-23 16:34:22.000000000 +0200 +++ linux/fs/namei.c 2005-09-23 16:34:27.000000000 +0200 @@ -1246,9 +1246,6 @@ static inline int lookup_flags(unsigned if (f & O_NOFOLLOW) retval &= ~LOOKUP_FOLLOW; - if ((f & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL)) - retval &= ~LOOKUP_FOLLOW; - if (f & O_DIRECTORY) retval |= LOOKUP_DIRECTORY; - 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/