diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-06-10 06:48:09 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-07-14 08:33:45 -0400 |
commit | e45198a6ac24bd2c4ad4a43b670c2f1a23dd2df3 (patch) | |
tree | d44f4217a8a556ac9ebb11cfc41c0e148fb1084c | |
parent | 2675a4eb6a9f1240098721c8a84ede28abd9d7b3 (diff) |
make finish_no_open() return int
namely, 1 ;-) That's what we want to return from ->atomic_open()
instances after finish_no_open().
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/9p/vfs_inode.c | 6 | ||||
-rw-r--r-- | fs/9p/vfs_inode_dotl.c | 6 | ||||
-rw-r--r-- | fs/ceph/dir.c | 6 | ||||
-rw-r--r-- | fs/cifs/dir.c | 3 | ||||
-rw-r--r-- | fs/fuse/dir.c | 3 | ||||
-rw-r--r-- | fs/nfs/dir.c | 3 | ||||
-rw-r--r-- | fs/open.c | 3 | ||||
-rw-r--r-- | include/linux/fs.h | 2 |
8 files changed, 12 insertions, 20 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index 2b05651e0c3d..eae476fb401c 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c | |||
@@ -878,10 +878,8 @@ v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry, | |||
878 | } | 878 | } |
879 | 879 | ||
880 | /* Only creates */ | 880 | /* Only creates */ |
881 | if (!(flags & O_CREAT) || dentry->d_inode) { | 881 | if (!(flags & O_CREAT) || dentry->d_inode) |
882 | finish_no_open(file, res); | 882 | return finish_no_open(file, res); |
883 | return 1; | ||
884 | } | ||
885 | 883 | ||
886 | err = 0; | 884 | err = 0; |
887 | fid = NULL; | 885 | fid = NULL; |
diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c index cfaebdef9743..1ee10c89df97 100644 --- a/fs/9p/vfs_inode_dotl.c +++ b/fs/9p/vfs_inode_dotl.c | |||
@@ -268,10 +268,8 @@ v9fs_vfs_atomic_open_dotl(struct inode *dir, struct dentry *dentry, | |||
268 | } | 268 | } |
269 | 269 | ||
270 | /* Only creates */ | 270 | /* Only creates */ |
271 | if (!(flags & O_CREAT) || dentry->d_inode) { | 271 | if (!(flags & O_CREAT) || dentry->d_inode) |
272 | finish_no_open(file, res); | 272 | return finish_no_open(file, res); |
273 | return 1; | ||
274 | } | ||
275 | 273 | ||
276 | v9ses = v9fs_inode2v9ses(dir); | 274 | v9ses = v9fs_inode2v9ses(dir); |
277 | 275 | ||
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 80c848e05390..d42eee1c5de3 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c | |||
@@ -662,10 +662,8 @@ int ceph_atomic_open(struct inode *dir, struct dentry *dentry, | |||
662 | } | 662 | } |
663 | 663 | ||
664 | /* We don't deal with positive dentries here */ | 664 | /* We don't deal with positive dentries here */ |
665 | if (dentry->d_inode) { | 665 | if (dentry->d_inode) |
666 | finish_no_open(file, res); | 666 | return finish_no_open(file, res); |
667 | return 1; | ||
668 | } | ||
669 | 667 | ||
670 | *opened |= FILE_CREATED; | 668 | *opened |= FILE_CREATED; |
671 | err = ceph_lookup_open(dir, dentry, file, flags, mode, opened); | 669 | err = ceph_lookup_open(dir, dentry, file, flags, mode, opened); |
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index c00c192f17e9..e8c53c80dbd5 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c | |||
@@ -405,8 +405,7 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry, | |||
405 | if (IS_ERR(res)) | 405 | if (IS_ERR(res)) |
406 | return PTR_ERR(res); | 406 | return PTR_ERR(res); |
407 | 407 | ||
408 | finish_no_open(file, res); | 408 | return finish_no_open(file, res); |
409 | return 1; | ||
410 | } | 409 | } |
411 | 410 | ||
412 | rc = check_name(direntry); | 411 | rc = check_name(direntry); |
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 110db5425dc1..ccdab3ac4223 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c | |||
@@ -509,8 +509,7 @@ mknod: | |||
509 | if (err) | 509 | if (err) |
510 | goto out_dput; | 510 | goto out_dput; |
511 | no_open: | 511 | no_open: |
512 | finish_no_open(file, res); | 512 | return finish_no_open(file, res); |
513 | return 1; | ||
514 | } | 513 | } |
515 | 514 | ||
516 | /* | 515 | /* |
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index dafc86c1c35e..f167c7a1d67b 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -1505,8 +1505,7 @@ no_open: | |||
1505 | if (IS_ERR(res)) | 1505 | if (IS_ERR(res)) |
1506 | goto out; | 1506 | goto out; |
1507 | 1507 | ||
1508 | finish_no_open(file, res); | 1508 | return finish_no_open(file, res); |
1509 | return 1; | ||
1510 | } | 1509 | } |
1511 | 1510 | ||
1512 | static int nfs4_lookup_revalidate(struct dentry *dentry, struct nameidata *nd) | 1511 | static int nfs4_lookup_revalidate(struct dentry *dentry, struct nameidata *nd) |
@@ -810,9 +810,10 @@ EXPORT_SYMBOL(finish_open); | |||
810 | * This can be used to set the result of a successful lookup in ->atomic_open(). | 810 | * This can be used to set the result of a successful lookup in ->atomic_open(). |
811 | * The filesystem's atomic_open() method shall return NULL after calling this. | 811 | * The filesystem's atomic_open() method shall return NULL after calling this. |
812 | */ | 812 | */ |
813 | void finish_no_open(struct file *file, struct dentry *dentry) | 813 | int finish_no_open(struct file *file, struct dentry *dentry) |
814 | { | 814 | { |
815 | file->f_path.dentry = dentry; | 815 | file->f_path.dentry = dentry; |
816 | return 1; | ||
816 | } | 817 | } |
817 | EXPORT_SYMBOL(finish_no_open); | 818 | EXPORT_SYMBOL(finish_no_open); |
818 | 819 | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index 1dcc75c95763..17ee20dba86c 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -2071,7 +2071,7 @@ enum { | |||
2071 | extern int finish_open(struct file *file, struct dentry *dentry, | 2071 | extern int finish_open(struct file *file, struct dentry *dentry, |
2072 | int (*open)(struct inode *, struct file *), | 2072 | int (*open)(struct inode *, struct file *), |
2073 | int *opened); | 2073 | int *opened); |
2074 | extern void finish_no_open(struct file *file, struct dentry *dentry); | 2074 | extern int finish_no_open(struct file *file, struct dentry *dentry); |
2075 | 2075 | ||
2076 | /* fs/ioctl.c */ | 2076 | /* fs/ioctl.c */ |
2077 | 2077 | ||