diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-12-15 13:41:55 -0800 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-12-15 13:41:55 -0800 | 
| commit | 5e176d6973bdac04d9f298ca384c39f08eb084cb (patch) | |
| tree | 3b6b3bce93a3db23eb2925b8b32b69d49561a0b1 | |
| parent | 39d2c3b96e072c8756f3b980588fa516b7988cb1 (diff) | |
| parent | 04102c76a779f1c4cec4f0fb51cacc360117b522 (diff) | |
Merge tag 'for-linus-4.10-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux
Pull orangefs updates from Mike Marshall:
 "Two small fixes sent in by other developers:
   - axe some dead code (Christophe Jaillet)
   - fix memory leak (Colin Ian King, found by Coverity)"
* tag 'for-linus-4.10-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux:
  orangefs: Axe some dead code
  orangefs: fix memory leak of string 'new' on exit path
| -rw-r--r-- | fs/orangefs/orangefs-debugfs.c | 4 | ||||
| -rw-r--r-- | fs/orangefs/orangefs-sysfs.c | 9 | 
2 files changed, 3 insertions, 10 deletions
| diff --git a/fs/orangefs/orangefs-debugfs.c b/fs/orangefs/orangefs-debugfs.c index 38887cc5577f..b5dbc9c6530c 100644 --- a/fs/orangefs/orangefs-debugfs.c +++ b/fs/orangefs/orangefs-debugfs.c @@ -671,8 +671,10 @@ int orangefs_prepare_debugfs_help_string(int at_boot)  		 */  		cdm_element_count =  			orangefs_prepare_cdm_array(client_debug_array_string); -		if (cdm_element_count <= 0) +		if (cdm_element_count <= 0) { +			kfree(new);  			goto out; +		}  		for (i = 0; i < cdm_element_count; i++) {  			strlcat(new, "\t", string_size); diff --git a/fs/orangefs/orangefs-sysfs.c b/fs/orangefs/orangefs-sysfs.c index a799546a67f7..084954448f18 100644 --- a/fs/orangefs/orangefs-sysfs.c +++ b/fs/orangefs/orangefs-sysfs.c @@ -609,15 +609,6 @@ static ssize_t sysfs_service_op_store(struct kobject *kobj,  			new_op->upcall.req.param.u.value32[0] = val1;  			new_op->upcall.req.param.u.value32[1] = val2;  			goto value_set; -		} else if (!strcmp(attr->attr.name, -				   "perf_counter_reset")) { -			if ((val > 0)) { -				new_op->upcall.req.param.op = -				ORANGEFS_PARAM_REQUEST_OP_READAHEAD_COUNT_SIZE; -			} else { -				rc = 0; -				goto out; -			}  		}  	} else if (!strcmp(kobj->name, ACACHE_KOBJ_ID)) { | 
