X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=fs%2Fcoda%2Fcnode.c;h=a7a780929eecb90c624d8fbd155bd32cea228f47;hb=d1b113bb028999e82a8528e1484be8c23fb5a7d9;hp=23aeef5aa8144a94dc69ea5abfc29ab286da77d7;hpb=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2;p=karo-tx-linux.git diff --git a/fs/coda/cnode.c b/fs/coda/cnode.c index 23aeef5aa814..a7a780929eec 100644 --- a/fs/coda/cnode.c +++ b/fs/coda/cnode.c @@ -16,7 +16,7 @@ static inline int coda_fideq(struct CodaFid *fid1, struct CodaFid *fid2) return memcmp(fid1, fid2, sizeof(*fid1)) == 0; } -static struct inode_operations coda_symlink_inode_operations = { +static const struct inode_operations coda_symlink_inode_operations = { .readlink = generic_readlink, .follow_link = page_follow_link_light, .put_link = page_put_link, @@ -55,11 +55,6 @@ static int coda_set_inode(struct inode *inode, void *data) return 0; } -static int coda_fail_inode(struct inode *inode, void *data) -{ - return -1; -} - struct inode * coda_iget(struct super_block * sb, struct CodaFid * fid, struct coda_vattr * attr) { @@ -120,8 +115,7 @@ void coda_replace_fid(struct inode *inode, struct CodaFid *oldfid, cii = ITOC(inode); - if (!coda_fideq(&cii->c_fid, oldfid)) - BUG(); + BUG_ON(!coda_fideq(&cii->c_fid, oldfid)); /* replace fid and rehash inode */ /* XXX we probably need to hold some lock here! */ @@ -142,7 +136,7 @@ struct inode *coda_fid_to_inode(struct CodaFid *fid, struct super_block *sb) return NULL; } - inode = iget5_locked(sb, hash, coda_test_inode, coda_fail_inode, fid); + inode = ilookup5(sb, hash, coda_test_inode, fid); if ( !inode ) return NULL;