?? fist-2.2.10.diff
字號:
diff -ruN linux-2.2.10-vanilla/fs/buffer.c linux-2.2.10-fist/fs/buffer.c--- linux-2.2.10-vanilla/fs/buffer.c Thu May 13 16:14:04 1999+++ linux-2.2.10-fist/fs/buffer.c Wed Jun 23 02:50:12 1999@@ -1099,23 +1099,6 @@ goto try_again; } -/* Run the hooks that have to be done when a page I/O has completed. */-static inline void after_unlock_page (struct page * page)-{- if (test_and_clear_bit(PG_decr_after, &page->flags)) {- atomic_dec(&nr_async_pages);-#ifdef DEBUG_SWAP- printk ("DebugVM: Finished IO on page %p, nr_async_pages %d\n",- (char *) page_address(page), - atomic_read(&nr_async_pages));-#endif- }- if (test_and_clear_bit(PG_swap_unlock_after, &page->flags))- swap_after_unlock_page(page->offset);- if (test_and_clear_bit(PG_free_after, &page->flags))- __free_page(page);-}- /* * Free all temporary buffers belonging to a page. * This needs to be called with interrupts disabled.diff -ruN linux-2.2.10-vanilla/fs/exec.c linux-2.2.10-fist/fs/exec.c--- linux-2.2.10-vanilla/fs/exec.c Sun Jun 13 13:50:04 1999+++ linux-2.2.10-fist/fs/exec.c Wed Jun 23 07:40:48 1999@@ -320,7 +320,7 @@ mpnt->vm_ops = NULL; mpnt->vm_offset = 0; mpnt->vm_file = NULL;- mpnt->vm_pte = 0;+ mpnt->vm_private_data = (void *) 0; insert_vm_struct(current->mm, mpnt); current->mm->total_vm = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT; }diff -ruN linux-2.2.10-vanilla/fs/namei.c linux-2.2.10-fist/fs/namei.c--- linux-2.2.10-vanilla/fs/namei.c Sat May 8 23:46:08 1999+++ linux-2.2.10-fist/fs/namei.c Thu Jun 24 20:46:55 1999@@ -16,6 +16,7 @@ #include <linux/proc_fs.h> #include <linux/smp_lock.h> #include <linux/quotaops.h>+#include <linux/dcache_func.h> #include <asm/uaccess.h> #include <asm/unaligned.h>@@ -533,83 +534,6 @@ return -EEXIST; return permission(dir,MAY_WRITE | MAY_EXEC); }--static inline struct dentry *get_parent(struct dentry *dentry)-{- return dget(dentry->d_parent);-}--static inline void unlock_dir(struct dentry *dir)-{- up(&dir->d_inode->i_sem);- dput(dir);-}--/*- * We need to do a check-parent every time- * after we have locked the parent - to verify- * that the parent is still our parent and- * that we are still hashed onto it..- *- * This is requied in case two processes race- * on removing (or moving) the same entry: the- * parent lock will serialize them, but the- * other process will be too late..- */-#define check_parent(dir, dentry) \- ((dir) == (dentry)->d_parent && !list_empty(&dentry->d_hash))--/*- * Locking the parent is needed to:- * - serialize directory operations- * - make sure the parent doesn't change from- * under us in the middle of an operation.- *- * NOTE! Right now we'd rather use a "struct inode"- * for this, but as I expect things to move toward- * using dentries instead for most things it is- * probably better to start with the conceptually- * better interface of relying on a path of dentries.- */-static inline struct dentry *lock_parent(struct dentry *dentry)-{- struct dentry *dir = dget(dentry->d_parent);-- down(&dir->d_inode->i_sem);- return dir;-}--/*- * Whee.. Deadlock country. Happily there are only two VFS- * operations that do this..- */-static inline void double_lock(struct dentry *d1, struct dentry *d2)-{- struct semaphore *s1 = &d1->d_inode->i_sem;- struct semaphore *s2 = &d2->d_inode->i_sem;-- if (s1 != s2) {- if ((unsigned long) s1 < (unsigned long) s2) {- struct semaphore *tmp = s2;- s2 = s1; s1 = tmp;- }- down(s1);- }- down(s2);-}--static inline void double_unlock(struct dentry *d1, struct dentry *d2)-{- struct semaphore *s1 = &d1->d_inode->i_sem;- struct semaphore *s2 = &d2->d_inode->i_sem;-- up(s1);- if (s1 != s2)- up(s2);- dput(d1);- dput(d2);-}- /* * Special case: O_CREAT|O_EXCL implies O_NOFOLLOW for securitydiff -ruN linux-2.2.10-vanilla/fs/nfsd/vfs.c linux-2.2.10-fist/fs/nfsd/vfs.c--- linux-2.2.10-vanilla/fs/nfsd/vfs.c Mon Apr 12 13:03:45 1999+++ linux-2.2.10-fist/fs/nfsd/vfs.c Fri Jun 25 19:35:54 1999@@ -993,12 +993,15 @@ * that the parent is still our parent and * that we are still hashed onto it.. *- * This is requied in case two processes race+ * This is required in case two processes race * on removing (or moving) the same entry: the * parent lock will serialize them, but the * other process will be too late..+ *+ * Note that this nfsd_check_parent is different+ * than the one in linux/include/dcache_func.h. */-#define check_parent(dir, dentry) \+#define nfsd_check_parent(dir, dentry) \ ((dir) == (dentry)->d_parent->d_inode && !list_empty(&dentry->d_hash)) /*@@ -1077,8 +1080,8 @@ nfsd_double_down(&tdir->i_sem, &fdir->i_sem); err = -ENOENT; /* GAM3 check for parent changes after locking. */- if (check_parent(fdir, odentry) &&- check_parent(tdir, ndentry)) {+ if (nfsd_check_parent(fdir, odentry) &&+ nfsd_check_parent(tdir, ndentry)) { err = vfs_rename(fdir, odentry, tdir, ndentry); if (!err && EX_ISSYNC(tfhp->fh_export)) {@@ -1166,7 +1169,7 @@ fhp->fh_locked = 1; err = -ENOENT;- if (check_parent(dirp, rdentry))+ if (nfsd_check_parent(dirp, rdentry)) err = vfs_rmdir(dirp, rdentry); rdentry->d_count--;diff -ruN linux-2.2.10-vanilla/fs/read_write.c linux-2.2.10-fist/fs/read_write.c--- linux-2.2.10-vanilla/fs/read_write.c Sun Dec 27 13:52:09 1998+++ linux-2.2.10-fist/fs/read_write.c Wed Jun 23 02:50:13 1999@@ -13,7 +13,7 @@ #include <asm/uaccess.h> -static loff_t default_llseek(struct file *file, loff_t offset, int origin)+loff_t default_llseek(struct file *file, loff_t offset, int origin) { long long retval; diff -ruN linux-2.2.10-vanilla/include/linux/dcache_func.h linux-2.2.10-fist/include/linux/dcache_func.h--- linux-2.2.10-vanilla/include/linux/dcache_func.h Wed Dec 31 19:00:00 1969+++ linux-2.2.10-fist/include/linux/dcache_func.h Fri Jun 25 17:01:50 1999@@ -0,0 +1,91 @@+#ifndef __LINUX_DCACHE_FUNC_H+#define __LINUX_DCACHE_FUNC_H++/*+ * Common dentry functions for inclusion in the VFS+ * or in other stackable file systems. Some of these+ * functions were in linux/fs/ C (VFS) files.+ */+#ifdef __KERNEL__+#include <linux/dcache.h>+#include <asm/semaphore.h>++/*+ * We need to do a check-parent every time+ * after we have locked the parent - to verify+ * that the parent is still our parent and+ * that we are still hashed onto it..+ *+ * This is required in case two processes race+ * on removing (or moving) the same entry: the+ * parent lock will serialize them, but the+ * other process will be too late..+ */+#define check_parent(dir, dentry) \+ ((dir) == (dentry)->d_parent && !list_empty(&dentry->d_hash))++/*+ * Locking the parent is needed to:+ * - serialize directory operations+ * - make sure the parent doesn't change from+ * under us in the middle of an operation.+ *+ * NOTE! Right now we'd rather use a "struct inode"+ * for this, but as I expect things to move toward+ * using dentries instead for most things it is+ * probably better to start with the conceptually+ * better interface of relying on a path of dentries.+ */+static inline struct dentry *lock_parent(struct dentry *dentry)+{+ struct dentry *dir = dget(dentry->d_parent);++ down(&dir->d_inode->i_sem);+ return dir;+}++static inline struct dentry *get_parent(struct dentry *dentry)+{+ return dget(dentry->d_parent);+}++static inline void unlock_dir(struct dentry *dir)+{+ up(&dir->d_inode->i_sem);+ dput(dir);+}++/*+ * Whee.. Deadlock country. Happily there is only one VFS+ * operation that does this..+ */+static inline void double_lock(struct dentry *d1, struct dentry *d2)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -