forked from Minki/linux
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] Minor cleanup [CIFS] Missing free in error path [CIFS] Reduce cifs stack space usage [CIFS] lseek polling returned stale EOF
This commit is contained in:
commit
768c242b30
@ -1,6 +1,8 @@
|
||||
Version 1.47
|
||||
------------
|
||||
Fix oops in list_del during mount caused by unaligned string.
|
||||
Seek to SEEK_END forces check for update of file size for non-cached
|
||||
files.
|
||||
|
||||
Version 1.46
|
||||
------------
|
||||
|
@ -511,7 +511,15 @@ static loff_t cifs_llseek(struct file *file, loff_t offset, int origin)
|
||||
{
|
||||
/* origin == SEEK_END => we must revalidate the cached file length */
|
||||
if (origin == SEEK_END) {
|
||||
int retval = cifs_revalidate(file->f_path.dentry);
|
||||
int retval;
|
||||
|
||||
/* some applications poll for the file length in this strange
|
||||
way so we must seek to end on non-oplocked files by
|
||||
setting the revalidate time to zero */
|
||||
if(file->f_path.dentry->d_inode)
|
||||
CIFS_I(file->f_path.dentry->d_inode)->time = 0;
|
||||
|
||||
retval = cifs_revalidate(file->f_path.dentry);
|
||||
if (retval < 0)
|
||||
return (loff_t)retval;
|
||||
}
|
||||
|
@ -1146,7 +1146,7 @@ static int cifs_writepages(struct address_space *mapping,
|
||||
pgoff_t end;
|
||||
pgoff_t index;
|
||||
int range_whole = 0;
|
||||
struct kvec iov[32];
|
||||
struct kvec * iov;
|
||||
int len;
|
||||
int n_iov = 0;
|
||||
pgoff_t next;
|
||||
@ -1174,12 +1174,18 @@ static int cifs_writepages(struct address_space *mapping,
|
||||
if(!experimEnabled)
|
||||
return generic_writepages(mapping, wbc);
|
||||
|
||||
iov = kmalloc(32 * sizeof(struct kvec), GFP_KERNEL);
|
||||
if(iov == NULL)
|
||||
return generic_writepages(mapping, wbc);
|
||||
|
||||
|
||||
/*
|
||||
* BB: Is this meaningful for a non-block-device file system?
|
||||
* If it is, we should test it again after we do I/O
|
||||
*/
|
||||
if (wbc->nonblocking && bdi_write_congested(bdi)) {
|
||||
wbc->encountered_congestion = 1;
|
||||
kfree(iov);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1345,7 +1351,7 @@ retry:
|
||||
mapping->writeback_index = index;
|
||||
|
||||
FreeXid(xid);
|
||||
|
||||
kfree(iov);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -196,7 +196,7 @@ dohash(char *out, char *in, char *key, int forw)
|
||||
char c[28];
|
||||
char d[28];
|
||||
char *cd;
|
||||
char ki[16][48];
|
||||
char (*ki)[48];
|
||||
char *pd1;
|
||||
char l[32], r[32];
|
||||
char *rl;
|
||||
@ -206,6 +206,12 @@ dohash(char *out, char *in, char *key, int forw)
|
||||
if(pk1 == NULL)
|
||||
return;
|
||||
|
||||
ki = kmalloc(16*48, GFP_KERNEL);
|
||||
if(ki == NULL) {
|
||||
kfree(pk1);
|
||||
return;
|
||||
}
|
||||
|
||||
cd = pk1 + 56;
|
||||
pd1= cd + 56;
|
||||
rl = pd1 + 64;
|
||||
@ -243,6 +249,7 @@ dohash(char *out, char *in, char *key, int forw)
|
||||
er = kmalloc(48+48+32+32+32, GFP_KERNEL);
|
||||
if(er == NULL) {
|
||||
kfree(pk1);
|
||||
kfree(ki);
|
||||
return;
|
||||
}
|
||||
erk = er+48;
|
||||
@ -290,6 +297,7 @@ dohash(char *out, char *in, char *key, int forw)
|
||||
|
||||
permute(out, rl, perm6, 64);
|
||||
kfree(pk1);
|
||||
kfree(ki);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user