which included commits to RCS files with non-trunk default branches.
{
down(&afs_linux_alloc_sem);
- /* iterate through all elements in the hash table and free both
- * the chunk and the atom associated with it.
- */
- afs_lhash_iter(lh_mem_htab, hash_free);
-
- /* free the atomlist. */
- afs_atomlist_destroy(al_mem_pool);
-
- /* free the hashlist. */
- afs_lhash_destroy(lh_mem_htab);
-
- /* change the state so that the allocator is now uninitialized. */
- allocator_init = 0;
-
+ if (allocator_init) {
+ /* iterate through all elements in the hash table and free both
+ * the chunk and the atom associated with it.
+ */
+ afs_lhash_iter(lh_mem_htab, hash_free);
+
+ /* free the atomlist. */
+ afs_atomlist_destroy(al_mem_pool);
+
+ /* free the hashlist. */
+ afs_lhash_destroy(lh_mem_htab);
+
+ /* change the state so that the allocator is now uninitialized. */
+ allocator_init = 0;
+ }
up(&afs_linux_alloc_sem);
}
return -code;
}
-#ifdef NOTUSED
-/* afs_linux_writepage - is this used anywhere? swap files via nfs? */
-int afs_linux_writepage(struct inode *ip, struct page *) { return -EINVAL };
+#if defined(AFS_LINUX24_ENV)
+int afs_linux_writepage(struct file *file, struct page *page)
+{
+ struct dentry *dentry = file->f_dentry;
+ struct inode *inode = dentry->d_inode;
+ unsigned long end_index = inode->i_size >> PAGE_CACHE_SHIFT;
+ unsigned offset = PAGE_CACHE_SIZE;
+ long status;
+
+ /* easy case */
+ if (page->index < end_index)
+ goto do_it;
+ /* things got complicated... */
+ offset = inode->i_size & (PAGE_CACHE_SIZE-1);
+ /* OK, are we completely out? */
+ if (page->index >= end_index+1 || !offset)
+ return -EIO;
+do_it:
+ status = afs_linux_updatepage(file, page, 0, offset, 1);
+ kunmap(page);
+ if (status == offset)
+ return 0;
+ else
+ return status;
+}
+#endif
+#ifdef NOTUSED
/* afs_linux_bmap - supports generic_readpage, but we roll our own. */
int afs_linux_bmap(struct inode *ip, int) { return -EINVAL; }
};
struct address_space_operations afs_file_aops = {
readpage: afs_linux_readpage,
+ writepage: afs_linux_writepage,
commit_write: afs_linux_commit_write,
prepare_write: afs_linux_prepare_write,
};
return 0;
}
+#if defined(AFS_SUN58_ENV)
+int afs_unmount (struct vfs *afsp, int flag, struct AFS_UCRED *credp)
+#else
int afs_unmount (struct vfs *afsp, struct AFS_UCRED *credp)
+#endif
{
AFS_GLOCK();
AFS_STATCNT(afs_unmount);
afs_sync,
afs_vget,
afs_mountroot,
- afs_swapvp
+ afs_swapvp,
+#if defined(AFS_SUN58_ENV)
+ fs_freevfs,
+#endif
};
/* actually a serious error, probably should panic. Probably will
* panic soon, oh well. */
ReleaseReadLock(&afs_xvcache);
+ afs_warnuser("afs_DoBulkStat: VLRU empty!");
goto done;
}
if ((VLRU.next->prev != &VLRU) || (VLRU.prev->next != &VLRU)) {
refpanic ("Bulkstat VLRU inconsistent6");
ReleaseWriteLock(&afs_xvcache);
+ ObtainWriteLock(&afs_xcbhash, 494);
+
/* We need to check the flags again. We may have missed
* something while we were waiting for a lock.
*/
if (!(tvcp->states & CBulkFetching) || (tvcp->m.Length != statSeqNo)) {
flagIndex++;
ReleaseWriteLock(&tvcp->lock);
+ ReleaseWriteLock(&afs_xcbhash);
afs_PutVCache(tvcp);
continue;
}
tvcp->v.v_op = &afs_symlink_iops;
#endif
- ObtainWriteLock(&afs_xcbhash, 494);
-
- /* We need to check the flags once more. We may have missed
- * something while we were waiting for a lock.
- */
- if (!(tvcp->states & CBulkFetching) || (tvcp->m.Length != statSeqNo)) {
- flagIndex++;
- ReleaseWriteLock(&afs_xcbhash);
- ReleaseWriteLock(&tvcp->lock);
- afs_PutVCache(tvcp);
- continue;
- }
-
/* do some accounting for bulk stats: mark this entry as
* loaded, so we can tell if we use it before it gets
* recycled.
#define _CODA_HEADER_
struct coda_inode_info {};
#endif
+#ifndef _LINUX_XFS_FS_I
+#define _LINUX_XFS_FS_I
+struct xfs_inode_info {};
+#endif
#include "../h/fs.h"
#include "../h/mm.h"
#endif
afs_int32 cell, volume;
AFS_STATCNT(PFlushVolumeData);
+ if (!avc)
+ return EINVAL;
if ( !afs_resourceinit_flag ) /* afs deamons havn't started yet */
return EIO; /* Inappropriate ioctl for device */
#define _LINUX_CODA_FS_I
#define _CFS_HEADER_
struct coda_inode_info {};
+#define _LINUX_XFS_FS_I
+struct xfs_inode_info {};
#include <asm/uaccess.h>
#include <linux/list.h>
#include <linux/dcache.h>
perm_src=`pwd`/../xprt ; \
echo "perm_src='$$perm_src'" ; \
set -x ; \
- ln -s $$perm_src/permit_export.h ${KERNELDIR}/afs/permit_xprt.h ; \
+ $(CP) $$perm_src/permit_export.h ${KERNELDIR}/afs/permit_xprt.h ; \
ln -s $$perm_src/permit_xprt.h ../permit_xprt.h ; \
else \
echo "CONFIG" ; \
perm_src=`pwd` ; \
echo "perm_src='$$perm_src'" ; \
set -x ; \
- ln -s $$perm_src/permit_xprt.h ${KERNELDIR}/afs/permit_xprt.h ; \
+ $(CP) $$perm_src/permit_xprt.h ${KERNELDIR}/afs/permit_xprt.h ; \
ln -s $$perm_src/permit_xprt.h ../permit_xprt.h ; \
fi
#define AFS_GCPAGS 1 /* if nonzero, garbage collect PAGs */
#define AFS_3DISPARES 1 /* Utilize the 3 available disk inode 'spares' */
-#define AFS_SYSCALL 101
+#define AFS_SYSCALL 65
/* File system entry (used if mount.h doesn't define MOUNT_AFS */
#define AFS_MOUNT_AFS "afs"
/*#define AFS_GLOBAL_SUNLOCK 1 /* For global locking */
#define AFS_3DISPARES 1 /* Utilize the 3 available disk inode 'spares' */
-#define AFS_SYSCALL 101
+#define AFS_SYSCALL 65
/* File system entry (used if mount.h doesn't define MOUNT_AFS */
#define AFS_MOUNT_AFS 1