From 07e6e38a89e5ebcac179845197c7f299a824f82c Mon Sep 17 00:00:00 2001 From: James Simmons Date: Sat, 17 Aug 2013 20:32:17 -0400 Subject: [PATCH] LU-2800 autoconf: remove LC_FS_RENAME_DOES_D_MOVE test FS_RENAME_DOES_D_MOVE has been upstream since v2.6.19. We can remove the test and the dead code. Signed-off-by: James Simmons Signed-off-by: Jeff Mahoney Change-Id: I71fc1e7c2216861dff2ce31f45c8ecaea64e7cfa Reviewed-on: http://review.whamcloud.com/5348 Tested-by: Maloo Tested-by: Hudson Reviewed-by: Bob Glossman Reviewed-by: Oleg Drokin --- lustre/autoconf/lustre-core.m4 | 23 ----------------------- lustre/include/linux/lustre_compat25.h | 4 ---- lustre/llite/namei.c | 6 +----- 3 files changed, 1 insertion(+), 32 deletions(-) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 13f492c..4b9ad6a 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -380,26 +380,6 @@ LB_LINUX_TRY_COMPILE([ ]) ]) -# 2.6.22 - -# -# 2.6.19 check for FS_RENAME_DOES_D_MOVE flag -# -AC_DEFUN([LC_FS_RENAME_DOES_D_MOVE], -[AC_MSG_CHECKING([if kernel has FS_RENAME_DOES_D_MOVE flag]) -LB_LINUX_TRY_COMPILE([ - #include -],[ - int v __attribute__ ((unused)); - v = FS_RENAME_DOES_D_MOVE; -],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_FS_RENAME_DOES_D_MOVE, 1, [kernel has FS_RENAME_DOES_D_MOVE flag]) -],[ - AC_MSG_RESULT([no]) -]) -]) - # 2.6.24 # 2.6.24 has bio_endio with 2 args @@ -1425,9 +1405,6 @@ AC_DEFUN([LC_PROG_LINUX], # raid5-zerocopy patch LC_PAGE_CONSTANT - # 2.6.22 - LC_FS_RENAME_DOES_D_MOVE - # 2.6.24 LC_BIO_ENDIO_2ARG LC_PROCFS_DELETED diff --git a/lustre/include/linux/lustre_compat25.h b/lustre/include/linux/lustre_compat25.h index bc510d8..c15c69d 100644 --- a/lustre/include/linux/lustre_compat25.h +++ b/lustre/include/linux/lustre_compat25.h @@ -160,10 +160,6 @@ static inline struct file *ll_dentry_open(struct path *path, int flags, #define FS_HAS_FIEMAP (0) #endif -#ifndef HAVE_FS_RENAME_DOES_D_MOVE -#define FS_RENAME_DOES_D_MOVE FS_ODD_RENAME -#endif - /* add a lustre compatible layer for crypto API */ #include #define ll_crypto_hash crypto_hash diff --git a/lustre/llite/namei.c b/lustre/llite/namei.c index 9d0523a..1aebd26 100644 --- a/lustre/llite/namei.c +++ b/lustre/llite/namei.c @@ -1373,12 +1373,8 @@ static int ll_rename(struct inode *old_dir, struct dentry *old_dentry, old_dentry, &old_dentry->d_name, new_dir, NULL, new_dentry, &new_dentry->d_name); - if (!err) { -#ifndef HAVE_FS_RENAME_DOES_D_MOVE - if (!S_ISDIR(old_dentry->d_inode->i_mode)) -#endif + if (!err) d_move(old_dentry, new_dentry); - } return err; } -- 1.8.3.1