From mboxrd@z Thu Jan 1 00:00:00 1970 From: Miklos Szeredi Subject: Re: [git pull] several fixes Date: Wed, 16 Mar 2011 18:17:54 +0100 Message-ID: References: <20110316144253.GT22723@ZenIV.linux.org.uk> Cc: torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: Al Viro Return-path: In-reply-to: <20110316144253.GT22723@ZenIV.linux.org.uk> (message from Al Viro on Wed, 16 Mar 2011 14:42:53 +0000) Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Wed, 16 Mar 2011, Al Viro wrote: > Several fixes, including the brown paperbag one for -ELOOP breakage > in the last commit of yesterday pull. Please, pull from the usual place - > git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6.git/ for-linus __fput doesn't need a cdev_put() for O_PATH handles. Signed-off-by: mszeredi@suse.cz --- fs/file_table.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Index: linux-2.6/fs/file_table.c =================================================================== --- linux-2.6.orig/fs/file_table.c 2011-03-16 16:13:25.000000000 +0100 +++ linux-2.6/fs/file_table.c 2011-03-16 17:50:22.000000000 +0100 @@ -246,8 +246,10 @@ static void __fput(struct file *file) file->f_op->release(inode, file); security_file_free(file); ima_file_free(file); - if (unlikely(S_ISCHR(inode->i_mode) && inode->i_cdev != NULL)) + if (unlikely(S_ISCHR(inode->i_mode) && inode->i_cdev != NULL && + !(file->f_mode & FMODE_PATH))) { cdev_put(inode->i_cdev); + } fops_put(file->f_op); put_pid(file->f_owner.pid); file_sb_list_del(file);