aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xattr.c
diff options
context:
space:
mode:
authorJan Blunck <jblunck@suse.de>2008-02-14 22:34:35 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-15 00:13:33 -0500
commit1d957f9bf87da74f420424d16ece005202bbebd3 (patch)
tree363d4770c0c74a536524c99ccd2762ce96ee9bbe /fs/xattr.c
parent4ac9137858e08a19f29feac4e1f4df7c268b0ba5 (diff)
Introduce path_put()
* Add path_put() functions for releasing a reference to the dentry and vfsmount of a struct path in the right order * Switch from path_release(nd) to path_put(&nd->path) * Rename dput_path() to path_put_conditional() [akpm@linux-foundation.org: fix cifs] Signed-off-by: Jan Blunck <jblunck@suse.de> Signed-off-by: Andreas Gruenbacher <agruen@suse.de> Acked-by: Christoph Hellwig <hch@lst.de> Cc: <linux-fsdevel@vger.kernel.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Steven French <sfrench@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/xattr.c')
-rw-r--r--fs/xattr.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/xattr.c b/fs/xattr.c
index be0ee756c5f1..3acab1615460 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
@@ -263,7 +263,7 @@ sys_setxattr(char __user *path, char __user *name, void __user *value,
263 if (error) 263 if (error)
264 return error; 264 return error;
265 error = setxattr(nd.path.dentry, name, value, size, flags); 265 error = setxattr(nd.path.dentry, name, value, size, flags);
266 path_release(&nd); 266 path_put(&nd.path);
267 return error; 267 return error;
268} 268}
269 269
@@ -278,7 +278,7 @@ sys_lsetxattr(char __user *path, char __user *name, void __user *value,
278 if (error) 278 if (error)
279 return error; 279 return error;
280 error = setxattr(nd.path.dentry, name, value, size, flags); 280 error = setxattr(nd.path.dentry, name, value, size, flags);
281 path_release(&nd); 281 path_put(&nd.path);
282 return error; 282 return error;
283} 283}
284 284
@@ -348,7 +348,7 @@ sys_getxattr(char __user *path, char __user *name, void __user *value,
348 if (error) 348 if (error)
349 return error; 349 return error;
350 error = getxattr(nd.path.dentry, name, value, size); 350 error = getxattr(nd.path.dentry, name, value, size);
351 path_release(&nd); 351 path_put(&nd.path);
352 return error; 352 return error;
353} 353}
354 354
@@ -363,7 +363,7 @@ sys_lgetxattr(char __user *path, char __user *name, void __user *value,
363 if (error) 363 if (error)
364 return error; 364 return error;
365 error = getxattr(nd.path.dentry, name, value, size); 365 error = getxattr(nd.path.dentry, name, value, size);
366 path_release(&nd); 366 path_put(&nd.path);
367 return error; 367 return error;
368} 368}
369 369
@@ -422,7 +422,7 @@ sys_listxattr(char __user *path, char __user *list, size_t size)
422 if (error) 422 if (error)
423 return error; 423 return error;
424 error = listxattr(nd.path.dentry, list, size); 424 error = listxattr(nd.path.dentry, list, size);
425 path_release(&nd); 425 path_put(&nd.path);
426 return error; 426 return error;
427} 427}
428 428
@@ -436,7 +436,7 @@ sys_llistxattr(char __user *path, char __user *list, size_t size)
436 if (error) 436 if (error)
437 return error; 437 return error;
438 error = listxattr(nd.path.dentry, list, size); 438 error = listxattr(nd.path.dentry, list, size);
439 path_release(&nd); 439 path_put(&nd.path);
440 return error; 440 return error;
441} 441}
442 442
@@ -483,7 +483,7 @@ sys_removexattr(char __user *path, char __user *name)
483 if (error) 483 if (error)
484 return error; 484 return error;
485 error = removexattr(nd.path.dentry, name); 485 error = removexattr(nd.path.dentry, name);
486 path_release(&nd); 486 path_put(&nd.path);
487 return error; 487 return error;
488} 488}
489 489
@@ -497,7 +497,7 @@ sys_lremovexattr(char __user *path, char __user *name)
497 if (error) 497 if (error)
498 return error; 498 return error;
499 error = removexattr(nd.path.dentry, name); 499 error = removexattr(nd.path.dentry, name);
500 path_release(&nd); 500 path_put(&nd.path);
501 return error; 501 return error;
502} 502}
503 503