Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751267AbbFKFi0 (ORCPT ); Thu, 11 Jun 2015 01:38:26 -0400 Received: from linuxhacker.ru ([217.76.32.60]:58848 "EHLO fiona.linuxhacker.ru" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1750717AbbFKFiS (ORCPT ); Thu, 11 Jun 2015 01:38:18 -0400 From: green@linuxhacker.ru To: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger Cc: Linux Kernel Mailing List , Oleg Drokin Subject: [PATCH v2 1/2] staging/lustre/llite: remove LL_IOC_REMOVE_ENTRY handler Date: Thu, 11 Jun 2015 01:37:50 -0400 Message-Id: <1434001071-30512-2-git-send-email-green@linuxhacker.ru> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1434001071-30512-1-git-send-email-green@linuxhacker.ru> References: <1434001071-30512-1-git-send-email-green@linuxhacker.ru> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2546 Lines: 72 From: Oleg Drokin It uses getname in unsafe manner and since it's to deal with corrupted or inconsistent filesystem, we are probably better to deal with it from lfsck anyway. Signed-off-by: Oleg Drokin --- .../lustre/lustre/include/lustre/lustre_user.h | 1 - drivers/staging/lustre/lustre/llite/dir.c | 29 ---------------------- 2 files changed, 30 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h index 89794fd..e095ada 100644 --- a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h +++ b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h @@ -243,7 +243,6 @@ struct ost_id { #define LL_IOC_LMV_SETSTRIPE _IOWR('f', 240, struct lmv_user_md) #define LL_IOC_LMV_GETSTRIPE _IOWR('f', 241, struct lmv_user_md) -#define LL_IOC_REMOVE_ENTRY _IOWR('f', 242, __u64) #define LL_IOC_SET_LEASE _IOWR('f', 243, long) #define LL_IOC_GET_LEASE _IO('f', 244) #define LL_IOC_HSM_IMPORT _IOWR('f', 245, struct hsm_user_import) diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c index 4b0de8d..87a042c 100644 --- a/drivers/staging/lustre/lustre/llite/dir.c +++ b/drivers/staging/lustre/lustre/llite/dir.c @@ -1436,35 +1436,6 @@ free_lmv: kfree(tmp); return rc; } - case LL_IOC_REMOVE_ENTRY: { - char *filename = NULL; - int namelen = 0; - int rc; - - /* Here is a little hack to avoid sending REINT_RMENTRY to - * unsupported server, which might crash the server(LU-2730), - * Because both LVB_TYPE and REINT_RMENTRY will be supported - * on 2.4, we use OBD_CONNECT_LVB_TYPE to detect whether the - * server will support REINT_RMENTRY XXX*/ - if (!(exp_connect_flags(sbi->ll_md_exp) & OBD_CONNECT_LVB_TYPE)) - return -ENOTSUPP; - - filename = ll_getname((const char *)arg); - if (IS_ERR(filename)) - return PTR_ERR(filename); - - namelen = strlen(filename); - if (namelen < 1) { - rc = -EINVAL; - goto out_rmdir; - } - - rc = ll_rmdir_entry(inode, filename, namelen); -out_rmdir: - if (filename) - ll_putname(filename); - return rc; - } case LL_IOC_LOV_SWAP_LAYOUTS: return -EPERM; case LL_IOC_OBD_STATFS: -- 2.1.0 -- 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/