diff options
Diffstat (limited to 'drivers/char/random.c')
-rw-r--r-- | drivers/char/random.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/drivers/char/random.c b/drivers/char/random.c index dcd08635cf1b..2849713d2231 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c | |||
@@ -1051,12 +1051,6 @@ random_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) | |||
1051 | /* like a named pipe */ | 1051 | /* like a named pipe */ |
1052 | } | 1052 | } |
1053 | 1053 | ||
1054 | /* | ||
1055 | * If we gave the user some bytes, update the access time. | ||
1056 | */ | ||
1057 | if (count) | ||
1058 | file_accessed(file); | ||
1059 | |||
1060 | return (count ? count : retval); | 1054 | return (count ? count : retval); |
1061 | } | 1055 | } |
1062 | 1056 | ||
@@ -1107,7 +1101,6 @@ static ssize_t random_write(struct file *file, const char __user *buffer, | |||
1107 | size_t count, loff_t *ppos) | 1101 | size_t count, loff_t *ppos) |
1108 | { | 1102 | { |
1109 | size_t ret; | 1103 | size_t ret; |
1110 | struct inode *inode = file->f_path.dentry->d_inode; | ||
1111 | 1104 | ||
1112 | ret = write_pool(&blocking_pool, buffer, count); | 1105 | ret = write_pool(&blocking_pool, buffer, count); |
1113 | if (ret) | 1106 | if (ret) |
@@ -1116,8 +1109,6 @@ static ssize_t random_write(struct file *file, const char __user *buffer, | |||
1116 | if (ret) | 1109 | if (ret) |
1117 | return ret; | 1110 | return ret; |
1118 | 1111 | ||
1119 | inode->i_mtime = current_fs_time(inode->i_sb); | ||
1120 | mark_inode_dirty(inode); | ||
1121 | return (ssize_t)count; | 1112 | return (ssize_t)count; |
1122 | } | 1113 | } |
1123 | 1114 | ||
@@ -1245,12 +1236,8 @@ static int proc_do_uuid(ctl_table *table, int write, | |||
1245 | if (uuid[8] == 0) | 1236 | if (uuid[8] == 0) |
1246 | generate_random_uuid(uuid); | 1237 | generate_random_uuid(uuid); |
1247 | 1238 | ||
1248 | sprintf(buf, "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-" | 1239 | sprintf(buf, "%pU", uuid); |
1249 | "%02x%02x%02x%02x%02x%02x", | 1240 | |
1250 | uuid[0], uuid[1], uuid[2], uuid[3], | ||
1251 | uuid[4], uuid[5], uuid[6], uuid[7], | ||
1252 | uuid[8], uuid[9], uuid[10], uuid[11], | ||
1253 | uuid[12], uuid[13], uuid[14], uuid[15]); | ||
1254 | fake_table.data = buf; | 1241 | fake_table.data = buf; |
1255 | fake_table.maxlen = sizeof(buf); | 1242 | fake_table.maxlen = sizeof(buf); |
1256 | 1243 | ||
@@ -1310,7 +1297,7 @@ ctl_table random_table[] = { | |||
1310 | 1297 | ||
1311 | /******************************************************************** | 1298 | /******************************************************************** |
1312 | * | 1299 | * |
1313 | * Random funtions for networking | 1300 | * Random functions for networking |
1314 | * | 1301 | * |
1315 | ********************************************************************/ | 1302 | ********************************************************************/ |
1316 | 1303 | ||