* sys_getcwd() could return -ENOENT -bzzz */
#ifdef DCACHE_LUSTRE_INVALID
dentry->d_flags |= DCACHE_LUSTRE_INVALID;
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
- __d_drop(dentry);
- if (dentry->d_inode) {
- /* Put positive dentries to orphan list */
- list_add(&dentry->d_hash,
- &ll_i2sbi(dentry->d_inode)->ll_orphan_dentry_list);
- }
-#endif
#else
if (!dentry->d_inode || !S_ISDIR(dentry->d_inode->i_mode))
__d_drop(dentry);
/* drop lookup or getattr locks immediately */
if (it->it_op == IT_LOOKUP || it->it_op == IT_GETATTR) {
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
/* on 2.6 there are situation when several lookups and
* revalidations may be requested during single operation.
* therefore, we don't release intent here -bzzz */
ll_intent_drop_lock(it);
-#else
- ll_intent_release(it);
-#endif
}
}
void ll_frob_intent(struct lookup_intent **itp, struct lookup_intent *deft)
{
struct lookup_intent *it = *itp;
-#if defined(HAVE_VFS_INTENT_PATCHES)&&(LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
+#ifdef HAVE_VFS_INTENT_PATCHES
if (it) {
LASSERTF(it->it_magic == INTENT_MAGIC, "bad intent magic: %x\n",
it->it_magic);
return;
}
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
#ifdef HAVE_VFS_INTENT_PATCHES
static int ll_revalidate_nd(struct dentry *dentry, struct nameidata *nd)
{
RETURN(rc);
}
#endif
-#endif
struct dentry_operations ll_d_ops = {
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
.d_revalidate = ll_revalidate_nd,
-#else
- .d_revalidate_it = ll_revalidate_it,
-#endif
.d_release = ll_release,
.d_delete = ll_ddelete,
#ifdef DCACHE_LUSTRE_INVALID