Changeset 8842
- Timestamp:
- 05/25/11 16:55:16 (2 years ago)
- Location:
- branches/Orange-Branch
- Files:
-
- 7 modified
-
configure (modified) (2 diffs)
-
maint/config/kernel.m4 (modified) (2 diffs)
-
pvfs2-config.h.in (modified) (5 diffs)
-
src/kernel/linux-2.6/acl.c (modified) (3 diffs)
-
src/kernel/linux-2.6/dcache.c (modified) (6 diffs)
-
src/kernel/linux-2.6/namei.c (modified) (2 diffs)
-
src/kernel/linux-2.6/pvfs2-kernel.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/Orange-Branch/configure
r8836 r8842 7177 7177 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 7178 7178 7179 tmp_cflags=$CFLAGS 7180 CFLAGS="$CFLAGS -Werror" 7181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for four-param generic_permission" >&5 7182 $as_echo_n "checking for four-param generic_permission... " >&6; } 7183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7184 /* end confdefs.h. */ 7185 7186 #define __KERNEL__ 7187 #include <linux/fs.h> 7188 struct inode *f; 7189 7190 int 7191 main () 7192 { 7193 7194 generic_permission(f, 0, 0, NULL); 7195 7196 ; 7197 return 0; 7198 } 7199 _ACEOF 7200 if ac_fn_c_try_compile "$LINENO"; then : 7201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 7202 $as_echo "yes" >&6; } 7203 7204 $as_echo "#define HAVE_FOUR_PARAM_GENERIC_PERMISSION 1" >>confdefs.h 7205 7206 else 7207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 7208 $as_echo "no" >&6; } 7209 7210 fi 7211 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 7212 7179 7213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for generic_getxattr api in kernel" >&5 7180 7214 $as_echo_n "checking for generic_getxattr api in kernel... " >&6; } … … 8721 8755 CFLAGS=$tmp_cflags 8722 8756 8723 8757 tmp_cflags=$CFLAGS 8758 CFLAGS="$CFLAGS -Werror" 8759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for three-param dentry_operations.d_hash" >&5 8760 $as_echo_n "checking for three-param dentry_operations.d_hash... " >&6; } 8761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8762 /* end confdefs.h. */ 8763 8764 #define __KERNEL__ 8765 #include <linux/fs.h> 8766 #include <linux/dcache.h> 8767 static struct dentry_operations d; 8768 static int d_hash_t(const struct dentry *d, 8769 const struct inode *i, 8770 struct qstr * q) 8771 { return 0; } 8772 8773 int 8774 main () 8775 { 8776 8777 d.d_hash = d_hash_t; 8778 8779 ; 8780 return 0; 8781 } 8782 _ACEOF 8783 if ac_fn_c_try_compile "$LINENO"; then : 8784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 8785 $as_echo "yes" >&6; } 8786 8787 $as_echo "#define HAVE_THREE_PARAM_D_HASH 1" >>confdefs.h 8788 8789 else 8790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8791 $as_echo "no" >&6; } 8792 8793 fi 8794 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 8795 CFLAGS=$tmp_cflags 8796 8797 8798 tmp_cflags=$CFLAGS 8799 CFLAGS="$CFLAGS -Werror" 8800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for seven-param dentry_operations.d_compare" >&5 8801 $as_echo_n "checking for seven-param dentry_operations.d_compare... " >&6; } 8802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8803 /* end confdefs.h. */ 8804 8805 #define __KERNEL__ 8806 #include <linux/fs.h> 8807 #include <linux/dcache.h> 8808 static struct dentry_operations d; 8809 static int d_compare_t(const struct dentry *d1, 8810 const struct inode *i1, 8811 const struct dentry *d2, 8812 const struct inode *i2, 8813 unsigned int len, 8814 const char *str, 8815 const struct qstr *qstr) 8816 { return 0; } 8817 8818 int 8819 main () 8820 { 8821 8822 d.d_compare = d_compare_t; 8823 8824 ; 8825 return 0; 8826 } 8827 _ACEOF 8828 if ac_fn_c_try_compile "$LINENO"; then : 8829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 8830 $as_echo "yes" >&6; } 8831 8832 $as_echo "#define HAVE_SEVEN_PARAM_D_COMPARE 1" >>confdefs.h 8833 8834 else 8835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8836 $as_echo "no" >&6; } 8837 8838 fi 8839 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 8840 CFLAGS=$tmp_cflags 8841 8842 8843 tmp_cflags=$CFLAGS 8844 CFLAGS="$CFLAGS -Werror" 8845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for constified dentry_operations.d_delete" >&5 8846 $as_echo_n "checking for constified dentry_operations.d_delete... " >&6; } 8847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8848 /* end confdefs.h. */ 8849 8850 #define __KERNEL__ 8851 #include <linux/fs.h> 8852 #include <linux/dcache.h> 8853 static struct dentry_operations d; 8854 static int d_delete_t(const struct dentry *d) 8855 { return 0; } 8856 8857 int 8858 main () 8859 { 8860 8861 d.d_delete = d_delete_t; 8862 8863 ; 8864 return 0; 8865 } 8866 _ACEOF 8867 if ac_fn_c_try_compile "$LINENO"; then : 8868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 8869 $as_echo "yes" >&6; } 8870 8871 $as_echo "#define HAVE_D_DELETE_CONST 1" >>confdefs.h 8872 8873 else 8874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8875 $as_echo "no" >&6; } 8876 8877 fi 8878 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 8879 CFLAGS=$tmp_cflags 8880 8881 tmp_cflags=$CFLAGS 8882 CFLAGS="$CFLAGS -Werror" 8883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dentry.d_count atomic_t type" >&5 8884 $as_echo_n "checking for dentry.d_count atomic_t type... " >&6; } 8885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8886 /* end confdefs.h. */ 8887 8888 #define __KERNEL__ 8889 #include <linux/fs.h> 8890 #include <linux/dcache.h> 8891 struct dentry d; 8892 atomic_t x; 8893 8894 int 8895 main () 8896 { 8897 8898 x = d.d_count; 8899 8900 ; 8901 return 0; 8902 } 8903 _ACEOF 8904 if ac_fn_c_try_compile "$LINENO"; then : 8905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 8906 $as_echo "yes" >&6; } 8907 8908 $as_echo "#define HAVE_DENTRY_D_COUNT_ATOMIC 1" >>confdefs.h 8909 8910 else 8911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8912 $as_echo "no" >&6; } 8913 8914 fi 8915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 8916 CFLAGS=$tmp_cflags 8917 8918 tmp_cflags=$CFLAGS 8919 CFLAGS="$CFLAGS -Werror" 8920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for three-param inode_operations permission" >&5 8921 $as_echo_n "checking for three-param inode_operations permission... " >&6; } 8922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8923 /* end confdefs.h. */ 8924 8925 #define __KERNEL__ 8926 #include <linux/fs.h> 8927 struct inode_operations i; 8928 int p(struct inode *i, int mode, unsigned int flags) 8929 { return 0; } 8930 8931 int 8932 main () 8933 { 8934 8935 i.permission = p; 8936 8937 ; 8938 return 0; 8939 } 8940 _ACEOF 8941 if ac_fn_c_try_compile "$LINENO"; then : 8942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 8943 $as_echo "yes" >&6; } 8944 8945 $as_echo "#define HAVE_THREE_PARAM_PERMISSION_WITH_FLAG 1" >>confdefs.h 8946 8947 else 8948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8949 $as_echo "no" >&6; } 8950 8951 fi 8952 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 8953 CFLAGS=$tmp_cflags 8954 8955 tmp_cflags=$CFLAGS 8956 CFLAGS="$CFLAGS -Werror" 8957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for three-param acl_check of generic_permission" >&5 8958 $as_echo_n "checking for three-param acl_check of generic_permission... " >&6; } 8959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8960 /* end confdefs.h. */ 8961 8962 #define __KERNEL__ 8963 #include <linux/fs.h> 8964 struct inode *i; 8965 int p(struct inode *i, int mode, unsigned int flags) 8966 { return 0; } 8967 8968 int 8969 main () 8970 { 8971 8972 generic_permission(i, 0, 0, p); 8973 8974 ; 8975 return 0; 8976 } 8977 _ACEOF 8978 if ac_fn_c_try_compile "$LINENO"; then : 8979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 8980 $as_echo "yes" >&6; } 8981 8982 $as_echo "#define HAVE_THREE_PARAM_ACL_CHECK 1" >>confdefs.h 8983 8984 else 8985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8986 $as_echo "no" >&6; } 8987 8988 fi 8989 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 8990 CFLAGS=$tmp_cflags 8724 8991 8725 8992 -
branches/Orange-Branch/maint/config/kernel.m4
r8805 r8842 710 710 ) 711 711 712 dnl generic_permission in 2.6.38 and newer has a four parameter 713 dnl signature 714 tmp_cflags=$CFLAGS 715 CFLAGS="$CFLAGS -Werror" 716 AC_MSG_CHECKING(for four-param generic_permission) 717 AC_TRY_COMPILE([ 718 #define __KERNEL__ 719 #include <linux/fs.h> 720 struct inode *f; 721 ], 722 [ 723 generic_permission(f, 0, 0, NULL); 724 ], 725 AC_MSG_RESULT(yes) 726 AC_DEFINE(HAVE_FOUR_PARAM_GENERIC_PERMISSION, 1, [Define if generic_permission takes four parameters]), 727 AC_MSG_RESULT(no) 728 ) 729 712 730 AC_MSG_CHECKING(for generic_getxattr api in kernel) 713 731 dnl if this test passes, the kernel does not have it … … 1475 1493 CFLAGS=$tmp_cflags 1476 1494 1477 1495 dnl dentry operations struct d_hash function has a different signature 1496 dnl in 2.6.38 and newer, second param is an inode 1497 tmp_cflags=$CFLAGS 1498 CFLAGS="$CFLAGS -Werror" 1499 AC_MSG_CHECKING(for three-param dentry_operations.d_hash) 1500 AC_TRY_COMPILE([ 1501 #define __KERNEL__ 1502 #include <linux/fs.h> 1503 #include <linux/dcache.h> 1504 static struct dentry_operations d; 1505 static int d_hash_t(const struct dentry *d, 1506 const struct inode *i, 1507 struct qstr * q) 1508 { return 0; } 1509 ], 1510 [ 1511 d.d_hash = d_hash_t; 1512 ], 1513 AC_MSG_RESULT(yes) 1514 AC_DEFINE(HAVE_THREE_PARAM_D_HASH, 1, [Define if d_hash member of dentry_operations has three params, the second inode paramsbeing the difference]), 1515 AC_MSG_RESULT(no) 1516 ) 1517 CFLAGS=$tmp_cflags 1518 1519 1520 dnl dentry operations struct d_compare function has a different 1521 dnl signature in 2.6.38 and newer, split out dentry/inodes, string and 1522 dnl qstr params 1523 tmp_cflags=$CFLAGS 1524 CFLAGS="$CFLAGS -Werror" 1525 AC_MSG_CHECKING(for seven-param dentry_operations.d_compare) 1526 AC_TRY_COMPILE([ 1527 #define __KERNEL__ 1528 #include <linux/fs.h> 1529 #include <linux/dcache.h> 1530 static struct dentry_operations d; 1531 static int d_compare_t(const struct dentry *d1, 1532 const struct inode *i1, 1533 const struct dentry *d2, 1534 const struct inode *i2, 1535 unsigned int len, 1536 const char *str, 1537 const struct qstr *qstr) 1538 { return 0; } 1539 ], 1540 [ 1541 d.d_compare = d_compare_t; 1542 ], 1543 AC_MSG_RESULT(yes) 1544 AC_DEFINE(HAVE_SEVEN_PARAM_D_COMPARE, 1, [Define if d_compare member of dentry_operations has seven params]), 1545 AC_MSG_RESULT(no) 1546 ) 1547 CFLAGS=$tmp_cflags 1548 1549 1550 dnl dentry operations struct d_delete argumentis constified in 1551 dnl 2.6.38 and newer 1552 tmp_cflags=$CFLAGS 1553 CFLAGS="$CFLAGS -Werror" 1554 AC_MSG_CHECKING(for constified dentry_operations.d_delete) 1555 AC_TRY_COMPILE([ 1556 #define __KERNEL__ 1557 #include <linux/fs.h> 1558 #include <linux/dcache.h> 1559 static struct dentry_operations d; 1560 static int d_delete_t(const struct dentry *d) 1561 { return 0; } 1562 ], 1563 [ 1564 d.d_delete = d_delete_t; 1565 ], 1566 AC_MSG_RESULT(yes) 1567 AC_DEFINE(HAVE_D_DELETE_CONST, 1, [Define if d_delete member of dentry_operations has a const dentry param]), 1568 AC_MSG_RESULT(no) 1569 ) 1570 CFLAGS=$tmp_cflags 1571 1572 dnl dentry member d_count is no longer atomic and has it's own spinlock 1573 dnl in 2.6.38 and newer 1574 tmp_cflags=$CFLAGS 1575 CFLAGS="$CFLAGS -Werror" 1576 AC_MSG_CHECKING(for dentry.d_count atomic_t type) 1577 AC_TRY_COMPILE([ 1578 #define __KERNEL__ 1579 #include <linux/fs.h> 1580 #include <linux/dcache.h> 1581 struct dentry d; 1582 atomic_t x; 1583 ], 1584 [ 1585 x = d.d_count; 1586 ], 1587 AC_MSG_RESULT(yes) 1588 AC_DEFINE(HAVE_DENTRY_D_COUNT_ATOMIC, 1, [Define if d_count member of dentry is of type atomic_t]), 1589 AC_MSG_RESULT(no) 1590 ) 1591 CFLAGS=$tmp_cflags 1592 1593 dnl permission function pointer in the inode_operations struct now 1594 dnl takes three params with the third being an unsigned int (circa 1595 dnl 2.6.38 1596 tmp_cflags=$CFLAGS 1597 CFLAGS="$CFLAGS -Werror" 1598 AC_MSG_CHECKING(for three-param inode_operations permission) 1599 AC_TRY_COMPILE([ 1600 #define __KERNEL__ 1601 #include <linux/fs.h> 1602 struct inode_operations i; 1603 int p(struct inode *i, int mode, unsigned int flags) 1604 { return 0; } 1605 ], 1606 [ 1607 i.permission = p; 1608 ], 1609 AC_MSG_RESULT(yes) 1610 AC_DEFINE(HAVE_THREE_PARAM_PERMISSION_WITH_FLAG, 1, [Define if permission function pointer of inode_operations struct has three parameters and the third parameter is for flags (unsigned int)]), 1611 AC_MSG_RESULT(no) 1612 ) 1613 CFLAGS=$tmp_cflags 1614 1615 dnl the acl_check parameter of the generic_permission function has a 1616 dnl third parameter circa 2.6.38 1617 tmp_cflags=$CFLAGS 1618 CFLAGS="$CFLAGS -Werror" 1619 AC_MSG_CHECKING(for three-param acl_check of generic_permission) 1620 AC_TRY_COMPILE([ 1621 #define __KERNEL__ 1622 #include <linux/fs.h> 1623 struct inode *i; 1624 int p(struct inode *i, int mode, unsigned int flags) 1625 { return 0; } 1626 ], 1627 [ 1628 generic_permission(i, 0, 0, p); 1629 ], 1630 AC_MSG_RESULT(yes) 1631 AC_DEFINE(HAVE_THREE_PARAM_ACL_CHECK, 1, [Define if acl_check param of generic_permission function has three parameters]), 1632 AC_MSG_RESULT(no) 1633 ) 1634 CFLAGS=$tmp_cflags 1478 1635 1479 1636 -
branches/Orange-Branch/pvfs2-config.h.in
r8795 r8842 74 74 #undef HAVE_DB_GET_PAGESIZE 75 75 76 /* Define if d_count member of dentry is of type atomic_t */ 77 #undef HAVE_DENTRY_D_COUNT_ATOMIC 78 76 79 /* Define if super_operations statfs has dentry argument */ 77 80 #undef HAVE_DENTRY_STATFS_SOP … … 82 85 /* Define if dcache.h contains d_alloc_annon */ 83 86 #undef HAVE_D_ALLOC_ANON 87 88 /* Define if d_delete member of dentry_operations has a const dentry param */ 89 #undef HAVE_D_DELETE_CONST 84 90 85 91 /* Define if export_operations has an encode_fh member */ … … 108 114 #undef HAVE_FIND_INODE_HANDLE_SUPER_OPERATIONS 109 115 116 /* Define if generic_permission takes four parameters */ 117 #undef HAVE_FOUR_PARAM_GENERIC_PERMISSION 118 110 119 /* Define to 1 if you have the `fsetxattr' function. */ 111 120 #undef HAVE_FSETXATTR … … 345 354 #undef HAVE_SETXATTR_CONST_ARG 346 355 356 /* Define if d_compare member of dentry_operations has seven params */ 357 #undef HAVE_SEVEN_PARAM_D_COMPARE 358 347 359 /* Define if SLAB_KERNEL is defined in kernel */ 348 360 #undef HAVE_SLAB_KERNEL … … 418 430 /* Define if TAU library is used */ 419 431 #undef HAVE_TAU 432 433 /* Define if acl_check param of generic_permission function has three 434 parameters */ 435 #undef HAVE_THREE_PARAM_ACL_CHECK 436 437 /* Define if d_hash member of dentry_operations has three params, the second 438 inode paramsbeing the difference */ 439 #undef HAVE_THREE_PARAM_D_HASH 440 441 /* Define if permission function pointer of inode_operations struct has three 442 parameters and the third parameter is for flags (unsigned int) */ 443 #undef HAVE_THREE_PARAM_PERMISSION_WITH_FLAG 420 444 421 445 /* Define if kernel stddef has true/false enum */ -
branches/Orange-Branch/src/kernel/linux-2.6/acl.c
r8724 r8842 712 712 } 713 713 714 static int pvfs2_check_acl(struct inode *inode, int mask) 714 static int pvfs2_check_acl(struct inode *inode, int mask 715 #ifdef HAVE_THREE_PARAM_ACL_CHECK 716 , unsigned int flags 717 #endif /* HAVE_THREE_PARAM_ACL_CHECK */ 718 ) 715 719 { 716 720 struct posix_acl *acl = NULL; … … 743 747 int pvfs2_permission(struct inode *inode, int mask) 744 748 #else 745 int pvfs2_permission(struct inode *inode, int mask, struct nameidata *nd) 746 #endif 749 int pvfs2_permission(struct inode *inode, int mask, 750 #ifdef HAVE_THREE_PARAM_PERMISSION_WITH_FLAG 751 unsigned int flags) 752 #else 753 struct nameidata *nd) 754 #endif /* HAVE_THREE_PARAM_PERMISSION_WITH_FLAG */ 755 #endif /* HAVE_TWO_PARAM_PERMISSION */ 747 756 { 748 757 #ifdef HAVE_CURRENT_FSUID … … 755 764 int ret; 756 765 757 ret = generic_permission(inode, mask, pvfs2_check_acl); 766 ret = generic_permission(inode, mask, 767 #ifdef HAVE_FOUR_PARAM_GENERIC_PERMISSION 768 0, 769 #endif /* HAVE_FOUR_PARAM_GENERIC_PERMISSION */ 770 pvfs2_check_acl); 758 771 if (ret != 0) 759 772 { -
branches/Orange-Branch/src/kernel/linux-2.6/dcache.c
r8726 r8842 152 152 } 153 153 154 static int pvfs2_d_delete (struct dentry * dentry) 154 static int pvfs2_d_delete ( 155 #ifdef HAVE_D_DELETE_CONST 156 const 157 #endif /* HAVE_D_DELETE_CONST */ 158 struct dentry * dentry 159 ) 155 160 { 156 161 gossip_debug(GOSSIP_DCACHE_DEBUG, … … 208 213 */ 209 214 static int pvfs2_d_hash( 215 #ifdef HAVE_THREE_PARAM_D_HASH 216 const struct dentry *parent, 217 const struct inode *inode, 218 struct qstr *hash 219 #else 210 220 struct dentry *parent, 211 struct qstr *hash) 221 struct qstr *hash 222 #endif /* HAVE_THREE_PARAM_D_HASH */ 223 ) 212 224 { 213 225 /* gossip_debug(GOSSIP_DCACHE_DEBUG, "pvfs2: pvfs2_d_hash called " */ … … 217 229 } 218 230 231 #ifdef HAVE_SEVEN_PARAM_D_COMPARE 232 static int pvfs2_d_compare( 233 const struct dentry *parent, 234 const struct inode * pinode, 235 const struct dentry *dentry, 236 const struct inode *inode, 237 unsigned int len, 238 const char *str, 239 const struct qstr *name) 240 { 241 int i = 0; 242 gossip_debug(GOSSIP_DCACHE_DEBUG, "pvfs2_d_compare: " 243 "called on parent %p\n (name1: %s| name2: %s)\n", 244 parent, str, name->name); 245 246 if( len != name->len ) 247 return 1; 248 249 for( i=0; i < len; i++ ) 250 { 251 if( str[i] != name->name[i] ) 252 return 1; 253 } 254 return 0; 255 } 256 #else 219 257 static int pvfs2_d_compare( 220 258 struct dentry *parent, … … 230 268 (memcmp(d_name->name, name->name, d_name->len) == 0)); 231 269 } 270 #endif /* HAVE_SEVEN_PARAM_D_COMPARE */ 271 232 272 233 273 /** PVFS2 implementation of VFS dentry operations */ … … 247 287 static void __attribute__ ((unused)) print_dentry(struct dentry *entry, int ret) 248 288 { 289 unsigned int local_count = 0; 249 290 if(!entry) 250 291 { … … 265 306 } 266 307 308 #ifdef HAVE_DENTRY_D_COUNT_ATOMIC 309 local_count = atomic_read(&entry->d_count); 310 #else 311 spin_lock(&entry->d_lock); 312 local_count = entry->d_count; 313 spin_unlock(&entry->d_lock); 314 #endif /* HAVE_DENTRY_D_COUNT_ATOMIC */ 315 267 316 printk("--- dentry %p: d_count: %d, name: %s, parent: %p, parent name: %s, ret: %d\n", 268 317 entry, 269 atomic_read(&entry->d_count),318 local_count, 270 319 entry->d_name.name, 271 320 entry->d_parent, -
branches/Orange-Branch/src/kernel/linux-2.6/namei.c
r8317 r8842 395 395 { 396 396 int ret = -EINVAL, are_directories = 0; 397 unsigned int local_count = 0; 397 398 pvfs2_inode_t *pvfs2_old_parent_inode = PVFS2_I(old_dir); 398 399 pvfs2_inode_t *pvfs2_new_parent_inode = PVFS2_I(new_dir); … … 400 401 struct super_block *sb = NULL; 401 402 403 404 #ifdef HAVE_DENTRY_D_COUNT_ATOMIC 405 local_count = atomic_read(&new_dentry->d_count); 406 #else 407 spin_lock( &new_dentry->d_lock ); 408 local_count = new_dentry->d_count; 409 spin_unlock( &new_dentry->d_lock ); 410 #endif /* HAVE_DENTRY_D_COUNT_ATOMIC */ 402 411 gossip_debug(GOSSIP_NAME_DEBUG, "pvfs2_rename: called (%s/%s => %s/%s) ct=%d\n", 403 412 old_dentry->d_parent->d_name.name, old_dentry->d_name.name, 404 413 new_dentry->d_parent->d_name.name, new_dentry->d_name.name, 405 atomic_read(&new_dentry->d_count));414 local_count); 406 415 407 416 are_directories = S_ISDIR(old_dentry->d_inode->i_mode); -
branches/Orange-Branch/src/kernel/linux-2.6/pvfs2-kernel.h
r8724 r8842 866 866 int pvfs2_permission(struct inode *, int); 867 867 #else 868 int pvfs2_permission(struct inode *inode, 869 int mask, struct nameidata *nd); 868 int pvfs2_permission(struct inode *, int mask, 869 #ifdef HAVE_THREE_PARAM_PERMISSION_WITH_FLAG 870 unsigned int flags); 871 #else 872 struct nameidata *nd); 873 #endif /* HAVE_THREE_PARAM_PERMISSION_WITH_FLAG */ 870 874 #endif 871 875
