Whamcloud - gitweb
Branch HEAD
authorfanyong <fanyong>
Tue, 20 May 2008 01:59:10 +0000 (01:59 +0000)
committerfanyong <fanyong>
Tue, 20 May 2008 01:59:10 +0000 (01:59 +0000)
b=15828
i=adilger
i=umka

return "-EIO" when write to read only proc interface which "write_proc" is NULL.

lustre/obdclass/lprocfs_status.c

index 608af88..afb48f0 100644 (file)
@@ -183,7 +183,7 @@ out:
 static ssize_t lprocfs_fops_write(struct file *f, const char __user *buf, size_t size, loff_t *ppos)
 {
         struct proc_dir_entry *dp = PDE(f->f_dentry->d_inode);
-        int rc = 0;
+        int rc = -EIO;
 
         LPROCFS_ENTRY();
         if (!dp->deleted && dp->write_proc)