dev.c (48706d0a91583d08c56e7ef2a7602d99c8d4133f) | dev.c (451d0f599934fd97faf54a5d7954b518e66192cb) |
---|---|
1/* 2 FUSE: Filesystem in Userspace 3 Copyright (C) 2001-2008 Miklos Szeredi <miklos@szeredi.hu> 4 5 This program can be distributed under the terms of the GNU GPL. 6 See the file COPYING. 7*/ 8 --- 1364 unchanged lines hidden (view full) --- 1373 goto err; 1374 fuse_copy_finish(cs); 1375 buf[outarg.namelen] = 0; 1376 name.hash = full_name_hash(name.name, name.len); 1377 1378 down_read(&fc->killsb); 1379 err = -ENOENT; 1380 if (fc->sb) | 1/* 2 FUSE: Filesystem in Userspace 3 Copyright (C) 2001-2008 Miklos Szeredi <miklos@szeredi.hu> 4 5 This program can be distributed under the terms of the GNU GPL. 6 See the file COPYING. 7*/ 8 --- 1364 unchanged lines hidden (view full) --- 1373 goto err; 1374 fuse_copy_finish(cs); 1375 buf[outarg.namelen] = 0; 1376 name.hash = full_name_hash(name.name, name.len); 1377 1378 down_read(&fc->killsb); 1379 err = -ENOENT; 1380 if (fc->sb) |
1381 err = fuse_reverse_inval_entry(fc->sb, outarg.parent, &name); | 1381 err = fuse_reverse_inval_entry(fc->sb, outarg.parent, 0, &name); |
1382 up_read(&fc->killsb); 1383 kfree(buf); 1384 return err; 1385 1386err: 1387 kfree(buf); 1388 fuse_copy_finish(cs); 1389 return err; 1390} 1391 | 1382 up_read(&fc->killsb); 1383 kfree(buf); 1384 return err; 1385 1386err: 1387 kfree(buf); 1388 fuse_copy_finish(cs); 1389 return err; 1390} 1391 |
1392static int fuse_notify_delete(struct fuse_conn *fc, unsigned int size, 1393 struct fuse_copy_state *cs) 1394{ 1395 struct fuse_notify_delete_out outarg; 1396 int err = -ENOMEM; 1397 char *buf; 1398 struct qstr name; 1399 1400 buf = kzalloc(FUSE_NAME_MAX + 1, GFP_KERNEL); 1401 if (!buf) 1402 goto err; 1403 1404 err = -EINVAL; 1405 if (size < sizeof(outarg)) 1406 goto err; 1407 1408 err = fuse_copy_one(cs, &outarg, sizeof(outarg)); 1409 if (err) 1410 goto err; 1411 1412 err = -ENAMETOOLONG; 1413 if (outarg.namelen > FUSE_NAME_MAX) 1414 goto err; 1415 1416 err = -EINVAL; 1417 if (size != sizeof(outarg) + outarg.namelen + 1) 1418 goto err; 1419 1420 name.name = buf; 1421 name.len = outarg.namelen; 1422 err = fuse_copy_one(cs, buf, outarg.namelen + 1); 1423 if (err) 1424 goto err; 1425 fuse_copy_finish(cs); 1426 buf[outarg.namelen] = 0; 1427 name.hash = full_name_hash(name.name, name.len); 1428 1429 down_read(&fc->killsb); 1430 err = -ENOENT; 1431 if (fc->sb) 1432 err = fuse_reverse_inval_entry(fc->sb, outarg.parent, 1433 outarg.child, &name); 1434 up_read(&fc->killsb); 1435 kfree(buf); 1436 return err; 1437 1438err: 1439 kfree(buf); 1440 fuse_copy_finish(cs); 1441 return err; 1442} 1443 |
|
1392static int fuse_notify_store(struct fuse_conn *fc, unsigned int size, 1393 struct fuse_copy_state *cs) 1394{ 1395 struct fuse_notify_store_out outarg; 1396 struct inode *inode; 1397 struct address_space *mapping; 1398 u64 nodeid; 1399 int err; --- 192 unchanged lines hidden (view full) --- 1592 return fuse_notify_inval_entry(fc, size, cs); 1593 1594 case FUSE_NOTIFY_STORE: 1595 return fuse_notify_store(fc, size, cs); 1596 1597 case FUSE_NOTIFY_RETRIEVE: 1598 return fuse_notify_retrieve(fc, size, cs); 1599 | 1444static int fuse_notify_store(struct fuse_conn *fc, unsigned int size, 1445 struct fuse_copy_state *cs) 1446{ 1447 struct fuse_notify_store_out outarg; 1448 struct inode *inode; 1449 struct address_space *mapping; 1450 u64 nodeid; 1451 int err; --- 192 unchanged lines hidden (view full) --- 1644 return fuse_notify_inval_entry(fc, size, cs); 1645 1646 case FUSE_NOTIFY_STORE: 1647 return fuse_notify_store(fc, size, cs); 1648 1649 case FUSE_NOTIFY_RETRIEVE: 1650 return fuse_notify_retrieve(fc, size, cs); 1651 |
1652 case FUSE_NOTIFY_DELETE: 1653 return fuse_notify_delete(fc, size, cs); 1654 |
|
1600 default: 1601 fuse_copy_finish(cs); 1602 return -EINVAL; 1603 } 1604} 1605 1606/* Look up request on processing list by unique ID */ 1607static struct fuse_req *request_find(struct fuse_conn *fc, u64 unique) --- 438 unchanged lines hidden --- | 1655 default: 1656 fuse_copy_finish(cs); 1657 return -EINVAL; 1658 } 1659} 1660 1661/* Look up request on processing list by unique ID */ 1662static struct fuse_req *request_find(struct fuse_conn *fc, u64 unique) --- 438 unchanged lines hidden --- |