diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-01-04 16:03:48 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-01-04 16:03:48 +0000 |
commit | 78c388aed2b7184182c08428db1de6c872d815f5 (patch) | |
tree | 4b2003b1b4ceb241a17faa995da8dd1004bb8e45 /fs/smbfs | |
parent | eb7a5bf93aaa4be1d7c6181100ab7639e74d67f7 (diff) |
Merge with Linux 2.1.131 and more MIPS goodies.
(Did I mention that CVS is buggy ...)
Diffstat (limited to 'fs/smbfs')
-rw-r--r-- | fs/smbfs/dir.c | 17 | ||||
-rw-r--r-- | fs/smbfs/file.c | 29 | ||||
-rw-r--r-- | fs/smbfs/proc.c | 8 |
3 files changed, 9 insertions, 45 deletions
diff --git a/fs/smbfs/dir.c b/fs/smbfs/dir.c index 92cd94363..f2ba59c4f 100644 --- a/fs/smbfs/dir.c +++ b/fs/smbfs/dir.c @@ -479,22 +479,15 @@ smb_rmdir(struct inode *dir, struct dentry *dentry) smb_close(inode); /* - * Prune any child dentries so this dentry can become negative. + * Check that nobody else is using the directory.. */ - if (dentry->d_count > 1) { - shrink_dcache_parent(dentry); - error = -EBUSY; - if (dentry->d_count > 1) - goto out; - } + error = -EBUSY; + if (!list_empty(&dentry->d_hash)) + goto out; smb_invalid_dir_cache(dir); error = smb_proc_rmdir(dentry); - if (!error) - { - smb_renew_times(dentry); - d_delete(dentry); - } + out: return error; } diff --git a/fs/smbfs/file.c b/fs/smbfs/file.c index 3c3e87aa6..a6cf24ce1 100644 --- a/fs/smbfs/file.c +++ b/fs/smbfs/file.c @@ -195,40 +195,15 @@ smb_writepage(struct file *file, struct page *page) } static int -smb_updatepage(struct file *file, struct page *page, const char *buffer, - unsigned long offset, unsigned int count, int sync) +smb_updatepage(struct file *file, struct page *page, unsigned long offset, unsigned int count, int sync) { struct dentry *dentry = file->f_dentry; - unsigned long page_addr = page_address(page); - int result; pr_debug("SMBFS: smb_updatepage(%s/%s %d@%ld, sync=%d)\n", dentry->d_parent->d_name.name, dentry->d_name.name, count, page->offset+offset, sync); -#ifdef SMBFS_PARANOIA - if (test_bit(PG_locked, &page->flags)) - printk("smb_updatepage: page already locked!\n"); -#endif - set_bit(PG_locked, &page->flags); - atomic_inc(&page->count); - - if (copy_from_user((char *) page_addr + offset, buffer, count)) - goto bad_fault; - result = smb_writepage_sync(dentry, page, offset, count); -out: - free_page(page_addr); - return result; - -bad_fault: -#ifdef SMBFS_PARANOIA -printk("smb_updatepage: fault at addr=%lu, offset=%lu, buffer=%p\n", -page_addr, offset, buffer); -#endif - result = -EFAULT; - clear_bit(PG_uptodate, &page->flags); - smb_unlock_page(page); - goto out; + return smb_writepage_sync(dentry, page, offset, count); } static ssize_t diff --git a/fs/smbfs/proc.c b/fs/smbfs/proc.c index b61bb3277..42981d483 100644 --- a/fs/smbfs/proc.c +++ b/fs/smbfs/proc.c @@ -520,9 +520,7 @@ server->conn_pid); /* * Wait for the new connection. */ - current->timeout = jiffies + 5*HZ; - interruptible_sleep_on(&server->wait); - current->timeout = 0; + interruptible_sleep_on_timeout(&server->wait, 5*HZ); if (signal_pending(current)) printk("smb_retry: caught signal\n"); @@ -1602,10 +1600,8 @@ ff_dir_handle, ff_resume_key, ff_lastname, mask); /* Windows 95 is not able to deliver answers * to FIND_NEXT fast enough, so sleep 0.2 sec */ - current->timeout = jiffies + HZ / 5; current->state = TASK_INTERRUPTIBLE; - schedule(); - current->timeout = 0; + schedule_timeout(HZ/5); } } |