mirror of
https://github.com/torvalds/linux.git
synced 2024-11-04 11:04:38 +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: free nativeFileSystem field before allocating a new one [CIFS] Distinguish posix opens and mkdirs from legacy mkdirs in stats
This commit is contained in:
commit
eb872c159f
@ -261,6 +261,8 @@ static ssize_t cifs_stats_proc_write(struct file *file,
|
||||
atomic_set(&tcon->num_reads, 0);
|
||||
atomic_set(&tcon->num_oplock_brks, 0);
|
||||
atomic_set(&tcon->num_opens, 0);
|
||||
atomic_set(&tcon->num_posixopens, 0);
|
||||
atomic_set(&tcon->num_posixmkdirs, 0);
|
||||
atomic_set(&tcon->num_closes, 0);
|
||||
atomic_set(&tcon->num_deletes, 0);
|
||||
atomic_set(&tcon->num_mkdirs, 0);
|
||||
@ -347,11 +349,15 @@ static int cifs_stats_proc_show(struct seq_file *m, void *v)
|
||||
atomic_read(&tcon->num_locks),
|
||||
atomic_read(&tcon->num_hardlinks),
|
||||
atomic_read(&tcon->num_symlinks));
|
||||
seq_printf(m, "\nOpens: %d Closes: %d"
|
||||
seq_printf(m, "\nOpens: %d Closes: %d "
|
||||
"Deletes: %d",
|
||||
atomic_read(&tcon->num_opens),
|
||||
atomic_read(&tcon->num_closes),
|
||||
atomic_read(&tcon->num_deletes));
|
||||
seq_printf(m, "\nPosix Opens: %d "
|
||||
"Posix Mkdirs: %d",
|
||||
atomic_read(&tcon->num_posixopens),
|
||||
atomic_read(&tcon->num_posixmkdirs));
|
||||
seq_printf(m, "\nMkdirs: %d Rmdirs: %d",
|
||||
atomic_read(&tcon->num_mkdirs),
|
||||
atomic_read(&tcon->num_rmdirs));
|
||||
|
@ -260,6 +260,8 @@ struct cifsTconInfo {
|
||||
atomic_t num_closes;
|
||||
atomic_t num_deletes;
|
||||
atomic_t num_mkdirs;
|
||||
atomic_t num_posixopens;
|
||||
atomic_t num_posixmkdirs;
|
||||
atomic_t num_rmdirs;
|
||||
atomic_t num_renames;
|
||||
atomic_t num_t2renames;
|
||||
|
@ -1113,7 +1113,10 @@ PsxCreat:
|
||||
psx_create_err:
|
||||
cifs_buf_release(pSMB);
|
||||
|
||||
cifs_stats_inc(&tcon->num_mkdirs);
|
||||
if (posix_flags & SMB_O_DIRECTORY)
|
||||
cifs_stats_inc(&tcon->num_posixmkdirs);
|
||||
else
|
||||
cifs_stats_inc(&tcon->num_posixopens);
|
||||
|
||||
if (rc == -EAGAIN)
|
||||
goto PsxCreat;
|
||||
|
@ -2726,6 +2726,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
|
||||
strncpy(tcon->treeName, tree, MAX_TREE_SIZE);
|
||||
|
||||
/* mostly informational -- no need to fail on error here */
|
||||
kfree(tcon->nativeFileSystem);
|
||||
tcon->nativeFileSystem = cifs_strndup_from_ucs(bcc_ptr,
|
||||
bytes_left, is_unicode,
|
||||
nls_codepage);
|
||||
|
Loading…
Reference in New Issue
Block a user