Whamcloud - gitweb
LU-2800 autoconf: remove LC_FS_RENAME_DOES_D_MOVE test 48/5348/9
authorJames Simmons <uja.ornl@gmail.com>
Sun, 18 Aug 2013 00:32:17 +0000 (20:32 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 3 Sep 2013 06:12:32 +0000 (06:12 +0000)
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 <uja.ornl@gmail.com>
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Change-Id: I71fc1e7c2216861dff2ce31f45c8ecaea64e7cfa
Reviewed-on: http://review.whamcloud.com/5348
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Hudson
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/autoconf/lustre-core.m4
lustre/include/linux/lustre_compat25.h
lustre/llite/namei.c

index 13f492c..4b9ad6a 100644 (file)
@@ -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 <linux/fs.h>
-],[
-        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
 # 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
 
          # 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
          # 2.6.24
          LC_BIO_ENDIO_2ARG
          LC_PROCFS_DELETED
index bc510d8..c15c69d 100644 (file)
@@ -160,10 +160,6 @@ static inline struct file *ll_dentry_open(struct path *path, int flags,
 #define FS_HAS_FIEMAP                  (0)
 #endif
 
 #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 <linux/crypto.h>
 #define ll_crypto_hash          crypto_hash
 /* add a lustre compatible layer for crypto API */
 #include <linux/crypto.h>
 #define ll_crypto_hash          crypto_hash
index 9d0523a..1aebd26 100644 (file)
@@ -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);
                                  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);
                         d_move(old_dentry, new_dentry);
-        }
         return err;
 }
 
         return err;
 }