cifs: implement i_op->atomic_open()

Add an ->atomic_open implementation which replaces the atomic lookup+open+create
operation implemented via ->lookup and ->create operations.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
CC: Steve French <sfrench@samba.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Miklos Szeredi
2012-06-05 15:10:23 +02:00
committed by Al Viro
parent c8ccbe032f
commit d2c127197d
3 changed files with 248 additions and 199 deletions
+1
View File
@@ -777,6 +777,7 @@ struct file_system_type cifs_fs_type = {
}; };
const struct inode_operations cifs_dir_inode_ops = { const struct inode_operations cifs_dir_inode_ops = {
.create = cifs_create, .create = cifs_create,
.atomic_open = cifs_atomic_open,
.lookup = cifs_lookup, .lookup = cifs_lookup,
.getattr = cifs_getattr, .getattr = cifs_getattr,
.unlink = cifs_unlink, .unlink = cifs_unlink,
+3
View File
@@ -46,6 +46,9 @@ extern const struct inode_operations cifs_dir_inode_ops;
extern struct inode *cifs_root_iget(struct super_block *); extern struct inode *cifs_root_iget(struct super_block *);
extern int cifs_create(struct inode *, struct dentry *, umode_t, extern int cifs_create(struct inode *, struct dentry *, umode_t,
struct nameidata *); struct nameidata *);
extern struct file *cifs_atomic_open(struct inode *, struct dentry *,
struct opendata *, unsigned, umode_t,
bool *);
extern struct dentry *cifs_lookup(struct inode *, struct dentry *, extern struct dentry *cifs_lookup(struct inode *, struct dentry *,
struct nameidata *); struct nameidata *);
extern int cifs_unlink(struct inode *dir, struct dentry *dentry); extern int cifs_unlink(struct inode *dir, struct dentry *dentry);
+244 -199
View File
File diff suppressed because it is too large Load Diff