Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 14709
b: refs/heads/master
c: 6aab341
h: refs/heads/master
i:
  14707: f8c8589
v: v3
  • Loading branch information
Linus Torvalds committed Nov 28, 2005
1 parent 3bb320c commit 77e63aa
Show file tree
Hide file tree
Showing 22 changed files with 168 additions and 303 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6ab16d249513a50bef3f1b275cea6aa8d3f51832
refs/heads/master: 6aab341e0a28aff100a09831c5300a2994b8b986
6 changes: 2 additions & 4 deletions trunk/arch/powerpc/kernel/vdso.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,7 @@ static void dump_vdso_pages(struct vm_area_struct * vma)
struct page *pg = virt_to_page(vdso32_kbase +
i*PAGE_SIZE);
struct page *upg = (vma && vma->vm_mm) ?
follow_page(vma->vm_mm, vma->vm_start +
i*PAGE_SIZE, 0)
follow_page(vma, vma->vm_start + i*PAGE_SIZE, 0)
: NULL;
dump_one_vdso_page(pg, upg);
}
Expand All @@ -157,8 +156,7 @@ static void dump_vdso_pages(struct vm_area_struct * vma)
struct page *pg = virt_to_page(vdso64_kbase +
i*PAGE_SIZE);
struct page *upg = (vma && vma->vm_mm) ?
follow_page(vma->vm_mm, vma->vm_start +
i*PAGE_SIZE, 0)
follow_page(vma, vma->vm_start + i*PAGE_SIZE, 0)
: NULL;
dump_one_vdso_page(pg, upg);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/char/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ static inline size_t read_zero_pagealigned(char __user * buf, size_t size)

if (vma->vm_start > addr || (vma->vm_flags & VM_WRITE) == 0)
goto out_up;
if (vma->vm_flags & (VM_SHARED | VM_HUGETLB | VM_UNPAGED))
if (vma->vm_flags & (VM_SHARED | VM_HUGETLB))
break;
count = vma->vm_end - addr;
if (count > size)
Expand Down
8 changes: 3 additions & 5 deletions trunk/fs/cifs/CHANGES
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
Version 1.39
------------
Defer close of a file handle slightly if pending writes depend on that handle
Defer close of a file handle slightly if pending writes depend on that file handle
(this reduces the EBADF bad file handle errors that can be logged under heavy
stress on writes). Modify cifs Kconfig options to expose CONFIG_CIFS_STATS2
Fix SFU style symlinks and mknod needed for servers which do not support the
CIFS Unix Extensions. Fix setfacl/getfacl on bigendian. Timeout negative
dentries so files that the client sees as deleted but that later get created
on the server will be recognized. Add client side permission check on setattr.
Fix SFU style symlinks and mknod needed for servers which do not support the CIFS
Unix Extensions. Fix setfacl/getfacl on bigendian.

Version 1.38
------------
Expand Down
30 changes: 6 additions & 24 deletions trunk/fs/cifs/README
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,7 @@ A partial list of the supported mount options follows:
(such as Windows), permissions can also be checked at the
client, and a crude form of client side permission checking
can be enabled by specifying file_mode and dir_mode on
the client. Note that the mount.cifs helper must be
at version 1.10 or higher to support specifying the uid
(or gid) in non-numberic form.
the client
gid If CIFS Unix extensions are not supported by the server
this overrides the default gid for inodes.
file_mode If CIFS Unix extensions are not supported by the server
Expand Down Expand Up @@ -347,10 +345,7 @@ A partial list of the supported mount options follows:
client system. It is typically only needed when the server
supports the CIFS Unix Extensions but the UIDs/GIDs on the
client and server system do not match closely enough to allow
access by the user doing the mount, but it may be useful with
non CIFS Unix Extension mounts for cases in which the default
mode is specified on the mount but is not to be enforced on the
client (e.g. perhaps when MultiUserMount is enabled)
access by the user doing the mount.
Note that this does not affect the normal ACL check on the
target machine done by the server software (of the server
ACL against the user name provided at mount time).
Expand All @@ -373,21 +368,15 @@ A partial list of the supported mount options follows:
setuids If the CIFS Unix extensions are negotiated with the server
the client will attempt to set the effective uid and gid of
the local process on newly created files, directories, and
devices (create, mkdir, mknod). If the CIFS Unix Extensions
are not negotiated, for newly created files and directories
instead of using the default uid and gid specified on the
the mount, cache the new file's uid and gid locally which means
that the uid for the file can change when the inode is
reloaded (or the user remounts the share).
devices (create, mkdir, mknod).
nosetuids The client will not attempt to set the uid and gid on
on newly created files, directories, and devices (create,
mkdir, mknod) which will result in the server setting the
uid and gid to the default (usually the server uid of the
user who mounted the share). Letting the server (rather than
the client) set the uid and gid is the default. If the CIFS
Unix Extensions are not negotiated then the uid and gid for
new files will appear to be the uid (gid) of the mounter or the
uid (gid) parameter specified on the mount.
the client) set the uid and gid is the default. This
parameter has no effect if the CIFS Unix Extensions are not
negotiated.
netbiosname When mounting to servers via port 139, specifies the RFC1001
source name to use to represent the client netbios machine
name when doing the RFC1001 netbios session initialize.
Expand Down Expand Up @@ -429,13 +418,6 @@ A partial list of the supported mount options follows:
byte range locks).
remount remount the share (often used to change from ro to rw mounts
or vice versa)
sfu When the CIFS Unix Extensions are not negotiated, attempt to
create device files and fifos in a format compatible with
Services for Unix (SFU). In addition retrieve bits 10-12
of the mode via the SETFILEBITS extended attribute (as
SFU does). In the future the bottom 9 bits of the mode
mode also will be emulated using queries of the security
descriptor (ACL).

The mount.cifs mount helper also accepts a few mount options before -o
including:
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/cifs/TODO
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Version 1.39 November 30, 2005
version 1.37 October 9, 2005

A Partial List of Missing Features
==================================
Expand Down Expand Up @@ -58,7 +58,7 @@ o) Improve performance of readpages by sending more than one read
at a time when 8 pages or more are requested. In conjuntion
add support for async_cifs_readpages.

p) Add support for storing symlink info to Windows servers
p) Add support for storing symlink and fifo info to Windows servers
in the Extended Attribute format their SFU clients would recognize.

q) Finish fcntl D_NOTIFY support so kde and gnome file list windows
Expand Down
23 changes: 1 addition & 22 deletions trunk/fs/cifs/cifsfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include <linux/seq_file.h>
#include <linux/vfs.h>
#include <linux/mempool.h>
#include <linux/delay.h>
#include "cifsfs.h"
#include "cifspdu.h"
#define DECLARE_GLOBALS_HERE
Expand Down Expand Up @@ -430,11 +429,6 @@ static void cifs_umount_begin(struct super_block * sblock)
{
cFYI(1,("wake up tasks now - umount begin not complete"));
wake_up_all(&tcon->ses->server->request_q);
wake_up_all(&tcon->ses->server->response_q);
msleep(1); /* yield */
/* we have to kick the requests once more */
wake_up_all(&tcon->ses->server->response_q);
msleep(1);
}
/* BB FIXME - finish add checks for tidStatus BB */

Expand Down Expand Up @@ -901,9 +895,6 @@ static int cifs_oplock_thread(void * dummyarg)

static int cifs_dnotify_thread(void * dummyarg)
{
struct list_head *tmp;
struct cifsSesInfo *ses;

daemonize("cifsdnotifyd");
allow_signal(SIGTERM);

Expand All @@ -912,19 +903,7 @@ static int cifs_dnotify_thread(void * dummyarg)
if(try_to_freeze())
continue;
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(15*HZ);
read_lock(&GlobalSMBSeslock);
/* check if any stuck requests that need
to be woken up and wakeq so the
thread can wake up and error out */
list_for_each(tmp, &GlobalSMBSessionList) {
ses = list_entry(tmp, struct cifsSesInfo,
cifsSessionList);
if(ses && ses->server &&
atomic_read(&ses->server->inSend))
wake_up_all(&ses->server->response_q);
}
read_unlock(&GlobalSMBSeslock);
schedule_timeout(39*HZ);
} while(!signal_pending(current));
complete_and_exit (&cifs_dnotify_exited, 0);
}
Expand Down
25 changes: 0 additions & 25 deletions trunk/fs/cifs/cifssmb.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,6 @@ small_smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
check for tcp and smb session status done differently
for those three - in the calling routine */
if(tcon) {
if(tcon->tidStatus == CifsExiting) {
/* only tree disconnect, open, and write,
(and ulogoff which does not have tcon)
are allowed as we start force umount */
if((smb_command != SMB_COM_WRITE_ANDX) &&
(smb_command != SMB_COM_OPEN_ANDX) &&
(smb_command != SMB_COM_TREE_DISCONNECT)) {
cFYI(1,("can not send cmd %d while umounting",
smb_command));
return -ENODEV;
}
}
if((tcon->ses) && (tcon->ses->status != CifsExiting) &&
(tcon->ses->server)){
struct nls_table *nls_codepage;
Expand Down Expand Up @@ -199,19 +187,6 @@ smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
check for tcp and smb session status done differently
for those three - in the calling routine */
if(tcon) {
if(tcon->tidStatus == CifsExiting) {
/* only tree disconnect, open, and write,
(and ulogoff which does not have tcon)
are allowed as we start force umount */
if((smb_command != SMB_COM_WRITE_ANDX) &&
(smb_command != SMB_COM_OPEN_ANDX) &&
(smb_command != SMB_COM_TREE_DISCONNECT)) {
cFYI(1,("can not send cmd %d while umounting",
smb_command));
return -ENODEV;
}
}

if((tcon->ses) && (tcon->ses->status != CifsExiting) &&
(tcon->ses->server)){
struct nls_table *nls_codepage;
Expand Down
34 changes: 10 additions & 24 deletions trunk/fs/cifs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,15 +228,8 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
else {
rc = cifs_get_inode_info(&newinode, full_path,
buf, inode->i_sb,xid);
if(newinode) {
if(newinode)
newinode->i_mode = mode;
if((oplock & CIFS_CREATE_ACTION) &&
(cifs_sb->mnt_cifs_flags &
CIFS_MOUNT_SET_UID)) {
newinode->i_uid = current->fsuid;
newinode->i_gid = current->fsgid;
}
}
}

if (rc != 0) {
Expand Down Expand Up @@ -472,20 +465,12 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry, struct name
direntry->d_op = &cifs_dentry_ops;
d_add(direntry, newInode);

/* since paths are not looked up by component - the parent
directories are presumed to be good here */
/* since paths are not looked up by component - the parent directories are presumed to be good here */
renew_parental_timestamps(direntry);

} else if (rc == -ENOENT) {
rc = 0;
direntry->d_time = jiffies;
if (pTcon->nocase)
direntry->d_op = &cifs_ci_dentry_ops;
else
direntry->d_op = &cifs_dentry_ops;
d_add(direntry, NULL);
/* if it was once a directory (but how can we tell?) we could do
shrink_dcache_parent(direntry); */
} else {
cERROR(1,("Error 0x%x on cifs_get_inode_info in lookup of %s",
rc,full_path));
Expand All @@ -504,20 +489,21 @@ cifs_d_revalidate(struct dentry *direntry, struct nameidata *nd)
{
int isValid = 1;

/* lock_kernel(); *//* surely we do not want to lock the kernel for a whole network round trip which could take seconds */

if (direntry->d_inode) {
if (cifs_revalidate(direntry)) {
/* unlock_kernel(); */
return 0;
}
} else {
cFYI(1, ("neg dentry 0x%p name = %s",
direntry, direntry->d_name.name));
if(time_after(jiffies, direntry->d_time + HZ) ||
!lookupCacheEnabled) {
d_drop(direntry);
isValid = 0;
}
cFYI(1,
("In cifs_d_revalidate with no inode but name = %s and dentry 0x%p",
direntry->d_name.name, direntry));
}

/* unlock_kernel(); */

return isValid;
}

Expand Down
50 changes: 11 additions & 39 deletions trunk/fs/cifs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode)
char *full_path = NULL;
struct inode *newinode = NULL;

cFYI(1, ("In cifs_mkdir, mode = 0x%x inode = 0x%p", mode, inode));
cFYI(1, ("In cifs_mkdir, mode = 0x%x inode = 0x%p ", mode, inode));

xid = GetXid();

Expand Down Expand Up @@ -768,16 +768,7 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode)
/* BB to be implemented via Windows secrty descriptors
eg CIFSSMBWinSetPerms(xid, pTcon, full_path, mode,
-1, -1, local_nls); */
if(direntry->d_inode) {
direntry->d_inode->i_mode = mode;
if(cifs_sb->mnt_cifs_flags &
CIFS_MOUNT_SET_UID) {
direntry->d_inode->i_uid =
current->fsuid;
direntry->d_inode->i_gid =
current->fsgid;
}
}
}
}
kfree(full_path);
FreeXid(xid);
Expand Down Expand Up @@ -1048,20 +1039,14 @@ int cifs_revalidate(struct dentry *direntry)
filemap_fdatawrite(direntry->d_inode->i_mapping);
}
if (invalidate_inode) {
/* shrink_dcache not necessary now that cifs dentry ops
are exported for negative dentries */
/* if(S_ISDIR(direntry->d_inode->i_mode))
shrink_dcache_parent(direntry); */
if (S_ISREG(direntry->d_inode->i_mode)) {
if (direntry->d_inode->i_mapping)
filemap_fdatawait(direntry->d_inode->i_mapping);
/* may eventually have to do this for open files too */
if (list_empty(&(cifsInode->openFileList))) {
/* changed on server - flush read ahead pages */
cFYI(1, ("Invalidating read ahead data on "
"closed file"));
invalidate_remote_inode(direntry->d_inode);
}
if (direntry->d_inode->i_mapping)
filemap_fdatawait(direntry->d_inode->i_mapping);
/* may eventually have to do this for open files too */
if (list_empty(&(cifsInode->openFileList))) {
/* Has changed on server - flush read ahead pages */
cFYI(1, ("Invalidating read ahead data on "
"closed file"));
invalidate_remote_inode(direntry->d_inode);
}
}
/* up(&direntry->d_inode->i_sem); */
Expand Down Expand Up @@ -1120,20 +1105,9 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)

cFYI(1, ("In cifs_setattr, name = %s attrs->iavalid 0x%x ",
direntry->d_name.name, attrs->ia_valid));

cifs_sb = CIFS_SB(direntry->d_inode->i_sb);
pTcon = cifs_sb->tcon;

if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_PERM == 0) {
/* check if we have permission to change attrs */
rc = inode_change_ok(direntry->d_inode, attrs);
if(rc < 0) {
FreeXid(xid);
return rc;
} else
rc = 0;
}

down(&direntry->d_sb->s_vfs_rename_sem);
full_path = build_path_from_dentry(direntry);
up(&direntry->d_sb->s_vfs_rename_sem);
Expand Down Expand Up @@ -1173,9 +1147,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
1 /* 45 seconds */);
cFYI(1,("Wrt seteof rc %d", rc));
}
} else
rc = -EINVAL;

}
if (rc != 0) {
/* Set file size by pathname rather than by handle
either because no valid, writeable file handle for
Expand Down
Loading

0 comments on commit 77e63aa

Please sign in to comment.