]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
* Varieus rmdir fixes
authorSam Hartman <hartmans@debian.org>
Fri, 30 Mar 2001 02:56:43 +0000 (02:56 +0000)
committerSam Hartman <hartmans@debian.org>
Fri, 30 Mar 2001 02:56:43 +0000 (02:56 +0000)
* Fix openafs-client postinst wrt grepping CellServDB
* Include docs for openafs-modules-source

debian/changelog
debian/openafs-client.postinst
debian/openafs-modules-source.docs [new file with mode: 0644]
src/afs/LINUX/osi_vnodeops.c

index feec6df9914acd7ae08de577637ce9af348661ea..44877b3969c37cfecf989723c923e8ee4e064abc 100644 (file)
@@ -1,3 +1,12 @@
+openafs (1.0.3-2) unstable; urgency=low
+
+  * Fix  direntry type to be DT_UNKNOWN not DT_DIR on Linux (contributed upstream)
+  * Return ENOTEMPTY not ENOTDIR for rmdir of non-empty directory, closes: #82589
+  * Include build instructions in modules, closes: #92032
+  * Don't grep a file for a potentially null string, closes: #89967
+
+ --
+
 openafs (1.0.3-1) unstable; urgency=low
 
   * New upstream version
index 65c0237d2b577e677aef1ac203fa430da83083b8..11a2041c745569a3d3427b5ccc657adc5ceeaa78 100644 (file)
@@ -28,7 +28,7 @@ case "$1" in
            else cp /usr/share/openafs/CellServDB \
              /etc/openafs
            fi
-       if grep  -q -F $RET /etc/openafs/CellServDB ; then :
+       if grep  -q -F "^$RET" /etc/openafs/CellServDB ; then :
                else db_input critical  openafs-client/cell-info || true
            db_input high openafs-client/run-client ||true
            db_go
diff --git a/debian/openafs-modules-source.docs b/debian/openafs-modules-source.docs
new file mode 100644 (file)
index 0000000..07ab0d3
--- /dev/null
@@ -0,0 +1,4 @@
+src/README
+debian/README.servers
+debian/configuration-transcript.txt
+debian/README.modules
index 05cfc8ae2ec1bade50d232e5ef6afdef124b72be..72209cc1a30d66c072d33bfd14f2435b4d1d6554 100644 (file)
 #include "../h/smp_lock.h"
 #endif
 
+#ifdef pgoff2loff
+#define pageoff(pp) pgoff2loff((pp)->index)
+#else
+#define pageoff(pp) pp->offset
+#endif
+
 extern struct vcache *afs_globalVp;
 
 extern struct dentry_operations *afs_dops;
@@ -225,7 +231,7 @@ tagain:
 
        /* filldir returns -EINVAL when the buffer is full. */
 #ifdef AFS_LINUX24_ENV
-       code = (*filldir)(dirbuf, de->name, len, offset, ino, DT_DIR);
+       code = (*filldir)(dirbuf, de->name, len, offset, ino, DT_UNKNOWN);
 #else
        code = (*filldir)(dirbuf, de->name, len, offset, ino); 
 #endif
@@ -709,27 +715,7 @@ static int afs_linux_dentry_revalidate(struct dentry *dp)
 /* afs_dentry_iput */
 static void afs_dentry_iput(struct dentry *dp, struct inode *ip)
 {
-#if defined(AFS_LINUX24_ENV)
-    if (atomic_read(&ip->i_count) == 0 || atomic_read(&ip->i_count) & 0xffff0000) {
-#else
-    if (ip->i_count == 0 || ip->i_count & 0xffff0000) {
-#endif
-       osi_Panic("Bad refCount %d on inode 0x%x\n",
-#if defined(AFS_LINUX24_ENV)
-                 atomic_read(&ip->i_count), ip);
-#else
-                 ip->i_count, ip);
-#endif
-    }
-#if defined(AFS_LINUX24_ENV)
-    atomic_dec(&ip->i_count);
-    if (!atomic_read(&ip->i_count)) {
-#else
-    ip->i_count --;
-    if (!ip->i_count) {
-#endif
-       afs_delete_inode(ip);
-    }
+    osi_iput(ip);
 }
 
 #if defined(AFS_LINUX24_ENV)
@@ -979,12 +965,12 @@ int afs_linux_rmdir(struct inode *dip, struct dentry *dp)
     AFS_GLOCK();
     code = afs_rmdir((struct vcache*)dip, name, credp);
 
-    /* Linux likes to see ENOTDIR returned from an rmdir() syscall
+    /* Linux likes to see ENOTEMPTY returned from an rmdir() syscall
      * that failed because a directory is not empty. So, we map
-     * EEXIST to ENOTDIR on linux.
+     * EEXIST to ENOTEMPTY on linux.
      */
     if (code == EEXIST) {
-       code = ENOTDIR;
+       code = ENOTEMPTY;
     }
     
     if (!code) {
@@ -1137,14 +1123,14 @@ int afs_linux_readpage(struct file *fp, struct page *pp)
     setup_uio(&tuio, &iovec, (char*)address, pp->index << PAGE_CACHE_SHIFT,
              PAGESIZE, UIO_READ, AFS_UIOSYS);
 #else
-    setup_uio(&tuio, &iovec, (char*)address, pp->offset, PAGESIZE,
+    setup_uio(&tuio, &iovec, (char*)address, pageoff(pp), PAGESIZE,
              UIO_READ, AFS_UIOSYS);
 #endif
-#ifdef AFS_LINUX24_ENV
+#if defined(AFS_LINUX24_ENV)
     lock_kernel();
 #endif
     code = afs_rdwr((struct vcache*)ip, &tuio, UIO_READ, 0, credp);
-#ifdef AFS_LINUX24_ENV
+#if defined(AFS_LINUX24_ENV)
     unlock_kernel();
 #endif
 
@@ -1153,6 +1139,9 @@ int afs_linux_readpage(struct file *fp, struct page *pp)
            memset((void*)(address+(PAGESIZE-tuio.uio_resid)), 0,
                   tuio.uio_resid);
 #if defined(AFS_LINUX24_ENV)
+#ifndef __powerpc__
+        flush_dcache_page(pp);
+#endif
         SetPageUptodate(pp);
 #else
        set_bit(PG_uptodate, &pp->flags);
@@ -1163,8 +1152,8 @@ int afs_linux_readpage(struct file *fp, struct page *pp)
     UnlockPage(pp);
 #else
     clear_bit(PG_locked, &pp->flags);
-#endif
     wake_up(&pp->wait);
+#endif
     free_page(address);
 
     crfree(credp);
@@ -1198,7 +1187,9 @@ int afs_linux_writepage(struct page *pp)
     if (pp->index >= end_index+1 || !offset)
        return -EIO;
 do_it:
+    AFS_GLOCK();
     status = afs_linux_writepage_sync(inode, pp, 0, offset);
+    AFS_GUNLOCK();
     SetPageUptodate(pp);
     UnlockPage(pp);
     /* kunmap(pp); */
@@ -1262,8 +1253,6 @@ int afs_linux_writepage_sync(struct inode *ip, struct page *pp,
     int f_flags = 0;
 
     credp = crref();
-    AFS_GLOCK();
-    lock_kernel();
     afs_Trace4(afs_iclSetp, CM_TRACE_UPDATEPAGE, ICL_TYPE_POINTER, vcp,
               ICL_TYPE_POINTER, pp,
               ICL_TYPE_INT32, atomic_read(&pp->count),
@@ -1282,8 +1271,6 @@ int afs_linux_writepage_sync(struct inode *ip, struct page *pp,
               ICL_TYPE_INT32, atomic_read(&pp->count),
               ICL_TYPE_INT32, code);
 
-    unlock_kernel();
-    AFS_GUNLOCK();
     crfree(credp);
 
     return code;
@@ -1322,7 +1309,7 @@ int afs_linux_updatepage(struct file *fp, struct page *pp,
               ICL_TYPE_POINTER, pp,
               ICL_TYPE_INT32, atomic_read(&pp->count),
               ICL_TYPE_INT32, 99999);
-    setup_uio(&tuio, &iovec, page_addr + offset, pp->offset + offset, count,
+    setup_uio(&tuio, &iovec, page_addr + offset, pageoff(pp) + offset, count,
              UIO_WRITE, AFS_UIOSYS);
 
     code = afs_write(vcp, &tuio, fp->f_flags, credp, 0);
@@ -1348,9 +1335,11 @@ static int afs_linux_commit_write(struct file *file, struct page *page, unsigned
 {
     long status;
 
-    /* lock_kernel(); */
+    AFS_GLOCK();
+    lock_kernel();
     status = afs_linux_updatepage(file, page, offset, to-offset);
-    /* unlock_kernel(); */
+    unlock_kernel();
+    AFS_GUNLOCK();
     kunmap(page);
 
     return status;