aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2012-03-23 14:40:56 -0400
committerJeff Layton <jlayton@redhat.com>2012-03-23 14:40:56 -0400
commit27ac5755aee0c99b9148ccceccb800270b9e5628 (patch)
tree9b3fe804a287b0f1a66fcc9447a8f1bb7691d8a6 /fs/cifs
parentda82f7e755d2808ba726c9b23267d5bb23980e94 (diff)
cifs: remove /proc/fs/cifs/OplockEnabled
We've had a deprecation warning on this file for 2 releases now. Remove it as promised for 3.4. Signed-off-by: Jeff Layton <jlayton@redhat.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/cifs_debug.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c
index 81be2637b57b..270464629416 100644
--- a/fs/cifs/cifs_debug.c
+++ b/fs/cifs/cifs_debug.c
@@ -418,7 +418,6 @@ static const struct file_operations cifs_stats_proc_fops = {
418 418
419static struct proc_dir_entry *proc_fs_cifs; 419static struct proc_dir_entry *proc_fs_cifs;
420static const struct file_operations cifsFYI_proc_fops; 420static const struct file_operations cifsFYI_proc_fops;
421static const struct file_operations cifs_oplock_proc_fops;
422static const struct file_operations cifs_lookup_cache_proc_fops; 421static const struct file_operations cifs_lookup_cache_proc_fops;
423static const struct file_operations traceSMB_proc_fops; 422static const struct file_operations traceSMB_proc_fops;
424static const struct file_operations cifs_multiuser_mount_proc_fops; 423static const struct file_operations cifs_multiuser_mount_proc_fops;
@@ -439,7 +438,6 @@ cifs_proc_init(void)
439#endif /* STATS */ 438#endif /* STATS */
440 proc_create("cifsFYI", 0, proc_fs_cifs, &cifsFYI_proc_fops); 439 proc_create("cifsFYI", 0, proc_fs_cifs, &cifsFYI_proc_fops);
441 proc_create("traceSMB", 0, proc_fs_cifs, &traceSMB_proc_fops); 440 proc_create("traceSMB", 0, proc_fs_cifs, &traceSMB_proc_fops);
442 proc_create("OplockEnabled", 0, proc_fs_cifs, &cifs_oplock_proc_fops);
443 proc_create("LinuxExtensionsEnabled", 0, proc_fs_cifs, 441 proc_create("LinuxExtensionsEnabled", 0, proc_fs_cifs,
444 &cifs_linux_ext_proc_fops); 442 &cifs_linux_ext_proc_fops);
445 proc_create("MultiuserMount", 0, proc_fs_cifs, 443 proc_create("MultiuserMount", 0, proc_fs_cifs,
@@ -463,7 +461,6 @@ cifs_proc_clean(void)
463 remove_proc_entry("Stats", proc_fs_cifs); 461 remove_proc_entry("Stats", proc_fs_cifs);
464#endif 462#endif
465 remove_proc_entry("MultiuserMount", proc_fs_cifs); 463 remove_proc_entry("MultiuserMount", proc_fs_cifs);
466 remove_proc_entry("OplockEnabled", proc_fs_cifs);
467 remove_proc_entry("SecurityFlags", proc_fs_cifs); 464 remove_proc_entry("SecurityFlags", proc_fs_cifs);
468 remove_proc_entry("LinuxExtensionsEnabled", proc_fs_cifs); 465 remove_proc_entry("LinuxExtensionsEnabled", proc_fs_cifs);
469 remove_proc_entry("LookupCacheEnabled", proc_fs_cifs); 466 remove_proc_entry("LookupCacheEnabled", proc_fs_cifs);
@@ -509,46 +506,6 @@ static const struct file_operations cifsFYI_proc_fops = {
509 .write = cifsFYI_proc_write, 506 .write = cifsFYI_proc_write,
510}; 507};
511 508
512static int cifs_oplock_proc_show(struct seq_file *m, void *v)
513{
514 seq_printf(m, "%d\n", enable_oplocks);
515 return 0;
516}
517
518static int cifs_oplock_proc_open(struct inode *inode, struct file *file)
519{
520 return single_open(file, cifs_oplock_proc_show, NULL);
521}
522
523static ssize_t cifs_oplock_proc_write(struct file *file,
524 const char __user *buffer, size_t count, loff_t *ppos)
525{
526 char c;
527 int rc;
528
529 printk(KERN_WARNING "CIFS: The /proc/fs/cifs/OplockEnabled interface "
530 "will be removed in kernel version 3.4. Please migrate to "
531 "using the 'enable_oplocks' module parameter in cifs.ko.\n");
532 rc = get_user(c, buffer);
533 if (rc)
534 return rc;
535 if (c == '0' || c == 'n' || c == 'N')
536 enable_oplocks = false;
537 else if (c == '1' || c == 'y' || c == 'Y')
538 enable_oplocks = true;
539
540 return count;
541}
542
543static const struct file_operations cifs_oplock_proc_fops = {
544 .owner = THIS_MODULE,
545 .open = cifs_oplock_proc_open,
546 .read = seq_read,
547 .llseek = seq_lseek,
548 .release = single_release,
549 .write = cifs_oplock_proc_write,
550};
551
552static int cifs_linux_ext_proc_show(struct seq_file *m, void *v) 509static int cifs_linux_ext_proc_show(struct seq_file *m, void *v)
553{ 510{
554 seq_printf(m, "%d\n", linuxExtEnabled); 511 seq_printf(m, "%d\n", linuxExtEnabled);