X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=fs%2Fufs%2Fnamei.c;h=e3a9b1fac75a2c4f6d04c94f6c22bb39d530d523;hb=c3d1d5c8c10c937c65186f6dac75e2fb4675ef07;hp=e84c0ecf07304f0f8222e3c438f4e1b8bb5bed34;hpb=82965addad66fce61a92c5f03104ea90b0b87124;p=linux-2.6-omap-h63xx.git diff --git a/fs/ufs/namei.c b/fs/ufs/namei.c index e84c0ecf073..e3a9b1fac75 100644 --- a/fs/ufs/namei.c +++ b/fs/ufs/namei.c @@ -29,9 +29,10 @@ #include #include -#include #include -#include "swab.h" /* will go away - see comment in mknod() */ + +#include "ufs_fs.h" +#include "ufs.h" #include "util.h" static inline int ufs_add_nondir(struct dentry *dentry, struct inode *inode) @@ -57,10 +58,10 @@ static struct dentry *ufs_lookup(struct inode * dir, struct dentry *dentry, stru lock_kernel(); ino = ufs_inode_by_name(dir, dentry); if (ino) { - inode = iget(dir->i_sb, ino); - if (!inode) { + inode = ufs_iget(dir->i_sb, ino); + if (IS_ERR(inode)) { unlock_kernel(); - return ERR_PTR(-EACCES); + return ERR_CAST(inode); } } unlock_kernel(); @@ -110,7 +111,6 @@ static int ufs_mknod (struct inode * dir, struct dentry *dentry, int mode, dev_t err = PTR_ERR(inode); if (!IS_ERR(inode)) { init_special_inode(inode, mode, rdev); - /* NOTE: that'll go when we get wide dev_t */ ufs_set_inode_dev(inode->i_sb, UFS_I(inode), rdev); mark_inode_dirty(inode); lock_kernel(); @@ -355,7 +355,7 @@ out: return err; } -struct inode_operations ufs_dir_inode_operations = { +const struct inode_operations ufs_dir_inode_operations = { .create = ufs_create, .lookup = ufs_lookup, .link = ufs_link,