mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-13 17:28:56 +00:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: [CIFS] Check return code on failed alloc [CIFS] Update CIFS project web site [CIFS] Fix hang in find_writable_file
This commit is contained in:
commit
edd5f25f74
@ -1009,7 +1009,7 @@ P: Steve French
|
|||||||
M: sfrench@samba.org
|
M: sfrench@samba.org
|
||||||
L: linux-cifs-client@lists.samba.org
|
L: linux-cifs-client@lists.samba.org
|
||||||
L: samba-technical@lists.samba.org
|
L: samba-technical@lists.samba.org
|
||||||
W: http://us1.samba.org/samba/Linux_CIFS_client.html
|
W: http://linux-cifs.samba.org/
|
||||||
T: git kernel.org:/pub/scm/linux/kernel/git/sfrench/cifs-2.6.git
|
T: git kernel.org:/pub/scm/linux/kernel/git/sfrench/cifs-2.6.git
|
||||||
S: Supported
|
S: Supported
|
||||||
|
|
||||||
|
@ -3,7 +3,10 @@ Version 1.50
|
|||||||
Fix NTLMv2 signing. NFS server mounted over cifs works (if cifs mount is
|
Fix NTLMv2 signing. NFS server mounted over cifs works (if cifs mount is
|
||||||
done with "serverino" mount option). Add support for POSIX Unlink
|
done with "serverino" mount option). Add support for POSIX Unlink
|
||||||
(helps with certain sharing violation cases when server such as
|
(helps with certain sharing violation cases when server such as
|
||||||
Samba supports newer POSIX CIFS Protocol Extensions).
|
Samba supports newer POSIX CIFS Protocol Extensions). Add "nounix"
|
||||||
|
mount option to allow disabling the CIFS Unix Extensions for just
|
||||||
|
that mount. Fix hang on spinlock in find_writable_file (race when
|
||||||
|
reopening file after session crash).
|
||||||
|
|
||||||
Version 1.49
|
Version 1.49
|
||||||
------------
|
------------
|
||||||
|
@ -444,6 +444,13 @@ A partial list of the supported mount options follows:
|
|||||||
noposixpaths If CIFS Unix extensions are supported, do not request
|
noposixpaths If CIFS Unix extensions are supported, do not request
|
||||||
posix path name support (this may cause servers to
|
posix path name support (this may cause servers to
|
||||||
reject creatingfile with certain reserved characters).
|
reject creatingfile with certain reserved characters).
|
||||||
|
nounix Disable the CIFS Unix Extensions for this mount (tree
|
||||||
|
connection). This is rarely needed, but it may be useful
|
||||||
|
in order to turn off multiple settings all at once (ie
|
||||||
|
posix acls, posix locks, posix paths, symlink support
|
||||||
|
and retrieving uids/gids/mode from the server) or to
|
||||||
|
work around a bug in server which implement the Unix
|
||||||
|
Extensions.
|
||||||
nobrl Do not send byte range lock requests to the server.
|
nobrl Do not send byte range lock requests to the server.
|
||||||
This is necessary for certain applications that break
|
This is necessary for certain applications that break
|
||||||
with cifs style mandatory byte range locks (and most
|
with cifs style mandatory byte range locks (and most
|
||||||
@ -451,6 +458,12 @@ A partial list of the supported mount options follows:
|
|||||||
byte range locks).
|
byte range locks).
|
||||||
remount remount the share (often used to change from ro to rw mounts
|
remount remount the share (often used to change from ro to rw mounts
|
||||||
or vice versa)
|
or vice versa)
|
||||||
|
servern Specify the server 's netbios name (RFC1001 name) to use
|
||||||
|
when attempting to setup a session to the server. This is
|
||||||
|
This is needed for mounting to some older servers (such
|
||||||
|
as OS/2 or Windows 98 and Windows ME) since they do not
|
||||||
|
support a default server name. A server name can be up
|
||||||
|
to 15 characters long and is usually uppercased.
|
||||||
sfu When the CIFS Unix Extensions are not negotiated, attempt to
|
sfu When the CIFS Unix Extensions are not negotiated, attempt to
|
||||||
create device files and fifos in a format compatible with
|
create device files and fifos in a format compatible with
|
||||||
Services for Unix (SFU). In addition retrieve bits 10-12
|
Services for Unix (SFU). In addition retrieve bits 10-12
|
||||||
|
@ -82,8 +82,7 @@ u) DOS attrs - returned as pseudo-xattr in Samba format (check VFAT and NTFS for
|
|||||||
|
|
||||||
v) mount check for unmatched uids
|
v) mount check for unmatched uids
|
||||||
|
|
||||||
w) Add mount option for Linux extension disable per mount, and partial
|
w) Add support for new vfs entry points for setlease and fallocate
|
||||||
disable per mount (uid off, symlink/fifo/mknod on but what about posix acls?)
|
|
||||||
|
|
||||||
x) Fix Samba 3 server to handle Linux kernel aio so dbench with lots of
|
x) Fix Samba 3 server to handle Linux kernel aio so dbench with lots of
|
||||||
processes can proceed better in parallel (on the server)
|
processes can proceed better in parallel (on the server)
|
||||||
|
@ -1904,6 +1904,25 @@ static int cifs_readpage(struct file *file, struct page *page)
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int is_inode_writable(struct cifsInodeInfo *cifs_inode)
|
||||||
|
{
|
||||||
|
struct cifsFileInfo *open_file;
|
||||||
|
|
||||||
|
read_lock(&GlobalSMBSeslock);
|
||||||
|
list_for_each_entry(open_file, &cifs_inode->openFileList, flist) {
|
||||||
|
if (open_file->closePend)
|
||||||
|
continue;
|
||||||
|
if (open_file->pfile &&
|
||||||
|
((open_file->pfile->f_flags & O_RDWR) ||
|
||||||
|
(open_file->pfile->f_flags & O_WRONLY))) {
|
||||||
|
read_unlock(&GlobalSMBSeslock);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
read_unlock(&GlobalSMBSeslock);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* We do not want to update the file size from server for inodes
|
/* We do not want to update the file size from server for inodes
|
||||||
open for write - to avoid races with writepage extending
|
open for write - to avoid races with writepage extending
|
||||||
the file - in the future we could consider allowing
|
the file - in the future we could consider allowing
|
||||||
@ -1912,19 +1931,13 @@ static int cifs_readpage(struct file *file, struct page *page)
|
|||||||
page caching in the current Linux kernel design */
|
page caching in the current Linux kernel design */
|
||||||
int is_size_safe_to_change(struct cifsInodeInfo *cifsInode, __u64 end_of_file)
|
int is_size_safe_to_change(struct cifsInodeInfo *cifsInode, __u64 end_of_file)
|
||||||
{
|
{
|
||||||
struct cifsFileInfo *open_file = NULL;
|
if (!cifsInode)
|
||||||
|
return 1;
|
||||||
|
|
||||||
if (cifsInode)
|
if (is_inode_writable(cifsInode)) {
|
||||||
open_file = find_writable_file(cifsInode);
|
/* This inode is open for write at least once */
|
||||||
|
|
||||||
if (open_file) {
|
|
||||||
struct cifs_sb_info *cifs_sb;
|
struct cifs_sb_info *cifs_sb;
|
||||||
|
|
||||||
/* there is not actually a write pending so let
|
|
||||||
this handle go free and allow it to
|
|
||||||
be closable if needed */
|
|
||||||
atomic_dec(&open_file->wrtPending);
|
|
||||||
|
|
||||||
cifs_sb = CIFS_SB(cifsInode->vfs_inode.i_sb);
|
cifs_sb = CIFS_SB(cifsInode->vfs_inode.i_sb);
|
||||||
if ( cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DIRECT_IO ) {
|
if ( cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DIRECT_IO ) {
|
||||||
/* since no page cache to corrupt on directio
|
/* since no page cache to corrupt on directio
|
||||||
|
@ -372,6 +372,10 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time,
|
|||||||
|
|
||||||
/* 2000 big enough to fit max user, domain, NOS name etc. */
|
/* 2000 big enough to fit max user, domain, NOS name etc. */
|
||||||
str_area = kmalloc(2000, GFP_KERNEL);
|
str_area = kmalloc(2000, GFP_KERNEL);
|
||||||
|
if (str_area == NULL) {
|
||||||
|
cifs_small_buf_release(smb_buf);
|
||||||
|
return -ENOMEM;
|
||||||
|
}
|
||||||
bcc_ptr = str_area;
|
bcc_ptr = str_area;
|
||||||
|
|
||||||
ses->flags &= ~CIFS_SES_LANMAN;
|
ses->flags &= ~CIFS_SES_LANMAN;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user