From patchwork Wed Sep 5 16:51:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Schubert X-Patchwork-Id: 181903 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id DD7E42C0094 for ; Thu, 6 Sep 2012 02:51:11 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750841Ab2IEQvJ (ORCPT ); Wed, 5 Sep 2012 12:51:09 -0400 Received: from mailgw1.uni-kl.de ([131.246.120.220]:34112 "EHLO mailgw1.uni-kl.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750800Ab2IEQvJ (ORCPT ); Wed, 5 Sep 2012 12:51:09 -0400 Received: from itwm2.itwm.fhg.de (itwm2.itwm.fhg.de [131.246.191.3]) by mailgw1.uni-kl.de (8.14.3/8.14.3/Debian-9.4) with ESMTP id q85Gp6m3030980 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NOT) for ; Wed, 5 Sep 2012 18:51:07 +0200 Received: from mail2.itwm.fhg.de ([131.246.191.79]:40273) by itwm2.itwm.fhg.de with esmtps (TLSv1:DES-CBC3-SHA:168) (/C=DE/ST=Rheinland-Pfalz/L=Kaiserslautern/O=Fraunhofer ITWM/OU=SLG/CN=mail2.itwm.fhg.de)(verified=1) (Exim 4.74 #1) id 1T9Ioi-0001TE-D4; Wed, 05 Sep 2012 18:51:04 +0200 Message-ID: <504782F8.2080005@itwm.fraunhofer.de> Date: Wed, 05 Sep 2012 18:51:04 +0200 From: Bernd Schubert User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120827 Thunderbird/15.0 MIME-Version: 1.0 To: "linux-ext4@vger.kernel.org List" , "Ted Ts'o" Subject: [PATCH] ext4: ext4_mknod: always set i_op X-ITWM-CharSet: UTF-8 X-ITWM-Scanned-By: mail2.itwm.fhg.de Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org While I was looking through the code, I noticed i_op is not always initialized, although operations such as setattr probably always should be set. ext4: ext4_mknod: always set i_op From: Bernd Schubert ext4_special_inode_operations have their own ifdef CONFIG_EXT4_FS_XATTR to mask those methods. And ext4_iget also always sets it, so there is an inconsistency. Signed-off-by: Bernd Schubert --- fs/ext4/namei.c | 2 -- 1 file changed, 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 2a42cc0..d13873d 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -2149,9 +2149,7 @@ retry: err = PTR_ERR(inode); if (!IS_ERR(inode)) { init_special_inode(inode, inode->i_mode, rdev); -#ifdef CONFIG_EXT4_FS_XATTR inode->i_op = &ext4_special_inode_operations; -#endif err = ext4_add_nondir(handle, dentry, inode); } ext4_journal_stop(handle);