diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-06 19:35:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-06 19:35:10 -0400 |
commit | 57d326169e878a1a37b2bccd1cf81f6809ee67b9 (patch) | |
tree | 86ed74ae4dc2beaebce1c67b8459f1873b777d3a /fs/dlm/config.c | |
parent | 7b215de3d0abbc4f6daf2efd19e8809af0564490 (diff) | |
parent | 0244756edc4b98c129e92c7061d9f383708cf786 (diff) |
Merge branch 'akpm' (patches from Andrew Morton) into next
Merge more updates from Andrew Morton:
- Most of the rest of MM.
This includes "mark remap_file_pages syscall as deprecated" but the
actual "replace remap_file_pages syscall with emulation" is held
back. I guess we'll need to work out when to pull the trigger on
that one.
- various minor cleanups to obscure filesystems
- the drivers/rtc queue
- hfsplus updates
- ufs, hpfs, fatfs, affs, reiserfs
- Documentation/
- signals
- procfs
- cpu hotplug
- lib/idr.c
- rapidio
- sysctl
- ipc updates
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (171 commits)
ufs: sb mutex merge + mutex_destroy
powerpc: update comments for generic idle conversion
cris: update comments for generic idle conversion
idle: remove cpu_idle() forward declarations
nbd: zero from and len fields in NBD_CMD_DISCONNECT.
mm: convert some level-less printks to pr_*
MAINTAINERS: adi-buildroot-devel is moderated
MAINTAINERS: add linux-api for review of API/ABI changes
mm/kmemleak-test.c: use pr_fmt for logging
fs/dlm/debug_fs.c: replace seq_printf by seq_puts
fs/dlm/lockspace.c: convert simple_str to kstr
fs/dlm/config.c: convert simple_str to kstr
mm: mark remap_file_pages() syscall as deprecated
mm: memcontrol: remove unnecessary memcg argument from soft limit functions
mm: memcontrol: clean up memcg zoneinfo lookup
mm/memblock.c: call kmemleak directly from memblock_(alloc|free)
mm/mempool.c: update the kmemleak stack trace for mempool allocations
lib/radix-tree.c: update the kmemleak stack trace for radix tree allocations
mm: introduce kmemleak_update_trace()
mm/kmemleak.c: use %u to print ->checksum
...
Diffstat (limited to 'fs/dlm/config.c')
-rw-r--r-- | fs/dlm/config.c | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/fs/dlm/config.c b/fs/dlm/config.c index 76feb4b60fa6..d521bddf876d 100644 --- a/fs/dlm/config.c +++ b/fs/dlm/config.c | |||
@@ -157,11 +157,13 @@ static ssize_t cluster_set(struct dlm_cluster *cl, unsigned int *cl_field, | |||
157 | const char *buf, size_t len) | 157 | const char *buf, size_t len) |
158 | { | 158 | { |
159 | unsigned int x; | 159 | unsigned int x; |
160 | int rc; | ||
160 | 161 | ||
161 | if (!capable(CAP_SYS_ADMIN)) | 162 | if (!capable(CAP_SYS_ADMIN)) |
162 | return -EPERM; | 163 | return -EPERM; |
163 | 164 | rc = kstrtouint(buf, 0, &x); | |
164 | x = simple_strtoul(buf, NULL, 0); | 165 | if (rc) |
166 | return rc; | ||
165 | 167 | ||
166 | if (check_zero && !x) | 168 | if (check_zero && !x) |
167 | return -EINVAL; | 169 | return -EINVAL; |
@@ -730,7 +732,10 @@ static ssize_t comm_nodeid_read(struct dlm_comm *cm, char *buf) | |||
730 | static ssize_t comm_nodeid_write(struct dlm_comm *cm, const char *buf, | 732 | static ssize_t comm_nodeid_write(struct dlm_comm *cm, const char *buf, |
731 | size_t len) | 733 | size_t len) |
732 | { | 734 | { |
733 | cm->nodeid = simple_strtol(buf, NULL, 0); | 735 | int rc = kstrtoint(buf, 0, &cm->nodeid); |
736 | |||
737 | if (rc) | ||
738 | return rc; | ||
734 | return len; | 739 | return len; |
735 | } | 740 | } |
736 | 741 | ||
@@ -742,7 +747,10 @@ static ssize_t comm_local_read(struct dlm_comm *cm, char *buf) | |||
742 | static ssize_t comm_local_write(struct dlm_comm *cm, const char *buf, | 747 | static ssize_t comm_local_write(struct dlm_comm *cm, const char *buf, |
743 | size_t len) | 748 | size_t len) |
744 | { | 749 | { |
745 | cm->local= simple_strtol(buf, NULL, 0); | 750 | int rc = kstrtoint(buf, 0, &cm->local); |
751 | |||
752 | if (rc) | ||
753 | return rc; | ||
746 | if (cm->local && !local_comm) | 754 | if (cm->local && !local_comm) |
747 | local_comm = cm; | 755 | local_comm = cm; |
748 | return len; | 756 | return len; |
@@ -846,7 +854,10 @@ static ssize_t node_nodeid_write(struct dlm_node *nd, const char *buf, | |||
846 | size_t len) | 854 | size_t len) |
847 | { | 855 | { |
848 | uint32_t seq = 0; | 856 | uint32_t seq = 0; |
849 | nd->nodeid = simple_strtol(buf, NULL, 0); | 857 | int rc = kstrtoint(buf, 0, &nd->nodeid); |
858 | |||
859 | if (rc) | ||
860 | return rc; | ||
850 | dlm_comm_seq(nd->nodeid, &seq); | 861 | dlm_comm_seq(nd->nodeid, &seq); |
851 | nd->comm_seq = seq; | 862 | nd->comm_seq = seq; |
852 | return len; | 863 | return len; |
@@ -860,7 +871,10 @@ static ssize_t node_weight_read(struct dlm_node *nd, char *buf) | |||
860 | static ssize_t node_weight_write(struct dlm_node *nd, const char *buf, | 871 | static ssize_t node_weight_write(struct dlm_node *nd, const char *buf, |
861 | size_t len) | 872 | size_t len) |
862 | { | 873 | { |
863 | nd->weight = simple_strtol(buf, NULL, 0); | 874 | int rc = kstrtoint(buf, 0, &nd->weight); |
875 | |||
876 | if (rc) | ||
877 | return rc; | ||
864 | return len; | 878 | return len; |
865 | } | 879 | } |
866 | 880 | ||